|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
Can some one show/explain me why the MsgBox is not running? Thank you, Chris <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Client Controls</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <script language="VBScript" type="text/vbscript"> <!-- Sub checkradio() for i=0 to 2 if document.frmbrowser.r1.item(i).checked then MsgBox "You have selected " & document.frmbrowser.r1.item(i).value End if next End sub --> </script> <form method="post" name="frmbrowser" onSubmit=""> <table width="200"> <tr> <td><label><input name="r1" type="radio" value="Internet Explorer">Internet Explorer</label></td> </tr> <tr> <td><label><input name="r1" type="radio" value="Netscape">Netscape</label></td> </tr> <tr> <td><label><input name="r1" type="radio" value="Mosaic">Mosaic</label></td> </tr> <tr> <td align="center" colspan="2" width="100" valign="middle"> <input name="Your Choice" type="button" value="Make Choice" language="VBScript" onClick="call checkradio()"> </td> </tr> </table> </form> </body> </html> |
|
#2
|
||||
|
||||
|
small oversite
if you look real close to your script
<script language="VBScript" type="text/vbscript"> <!-- Sub checkradio() for i=0 to 2 if document.frmbrowser.r1.item(i).checked then MsgBox "You have selected " & document.frmbrowser.r1.item(i).value End if next End sub --> </script> you will notice the "Then" is on the wrong line :-) i do that all the time .......it should look like this <script language="VBScript" type="text/vbscript"> <!-- Sub checkradio() for i=0 to 2 if document.frmbrowser.r1.item(i).checked Then MsgBox "You have selected " & document.frmbrowser.r1.item(i).value End if next End sub --> </script> |
|
#3
|
|||
|
|||
|
Thank you a lot! I am new - I just started today...and spend 5 hours with this...
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > MsgBox - need help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|