ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 1st, 2003, 11:47 PM
crypope crypope is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: VANCOUVER
Posts: 2 crypope User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry MsgBox - need help

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>

Reply With Quote
  #2  
Old November 2nd, 2003, 01:38 AM
LabRaTT's Avatar
LabRaTT LabRaTT is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Boston, MA, USA
Posts: 23 LabRaTT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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>

Reply With Quote
  #3  
Old November 2nd, 2003, 01:49 AM
crypope crypope is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: VANCOUVER
Posts: 2 crypope User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank you a lot! I am new - I just started today...and spend 5 hours with this...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > MsgBox - need help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway