Re: Javascript alert

Xu Jia <[email protected]>
Newsgroups gmane.comp.web.httpunit.devel
Message-ID <[email protected]>
James Abley wrote:
> On 28/03/06, Xu Jia <[email protected]> wrote:
>> Hello,
>>
>> I have this code in html page
>> <IMG SRC=javascript:alert(1111)>
>> If I use Internet Explorer, i get the alert message "1111", but if I use
>> browser.getWebClient().getNextAlert();
>> I can not get this alert.
>>
>> JSUnit seems to not meet my request.
>>
>> Can you help me? Thanks!
>>
>> Regards, Xu
>>
>>
> 
> Sorry, I must have missed something. You seem to be asking a question
> about jsUnit to the HttpUnit mailing list?
> 
> As a suggestion, try writing HTML 4.01 or XHTML, as a better practice; i.e.
> 
> <img src="javascript:alert('1111')" />
> 
> James

Hi James,

i think i am in the right mailing list.
now i have this <img src="javascript:alert('1111')" /> in my html file,
but browser.getWebClient().getNextAlert() is empty.
if I put <script>alert(1111)</script> in the html file,
browser.getWebClient().getNextAlert() returns the text 1111, which is 
correct.

Thanks!

Regards, Xu



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.