Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

No message box prompted?

Hi,

Would anyone give me advice on the following script written in a Web Form:

Response.write("<script lang='Javascript'> if(confirm('Are you sure')==false); return false; </script>")

When it is executed, the browser could not prompt with a confirmation dialog box, but it could prompt an alert box, why?
[365 byte] By [THL] at [2007-11-11 7:13:28]
# 1 Re: No message box prompted?
try using this syntax
<script lang="Javascript">if (confirm('Are you sure')) {} else {return false;})</script>
srinivas_s at 2007-11-11 23:13:51 >