Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 23rd, 2007, 11:58 PM
Registered User
 
Join Date: Apr 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Radio button problem

hello , i'm doing a survey in asp which is connected to ms sql server , i've tested my code and its working , i'm trying to show warnning msg to the user , when ever the user forgets to vote for any service for example reservation , and byt the reservation has 3 values .But my code is not working in the way i wanted to, it gives me a warnning msg even though if i select one of the values! , can any one help me out

<html>
<titl></title>
<head>

<SCRIPT LANGUAGE="VBScript">
<!--
sub validat()

Dim v
  For n = v to Document.frm.reservation.length - 1
    If not Document.frm.reservation(v).checked Then
   msgbox "Please vote the reservation"
  exit for
  end if
if document.frm.reservation(v).checked then

  frm.submit
 end if
  exit for
  Next
frm.submit

end sub
//-->
</script>


</head>
<body>
<form name="frm" method=post action="vote.asp">

<input type="radio" name="reservation" value="bad">bad
<input type="radio" name="reservation" value="good">good
<input type="radio" name="reservation" value="Excellent">Excellent

<input type="submit" value="submit" onclick="validat">
</form>
</body>
</html>
</body>





 
Old April 24th, 2007, 12:42 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

This is not related to the Survey chapter of the book Instant Results is it?

I think you're better off posting this in one of the VBScript or ASP related categories here at p2p.wrox.com.

Cheers,

Imar





Similar Threads
Thread Thread Starter Forum Replies Last Post
Radio button Jolley_tolson Javascript 2 July 15th, 2007 05:50 AM
VBExpress 2005 : Radio Button Problem mague Visual Basic 2005 Basics 0 July 4th, 2007 02:13 AM
Radio button problem rkid VBScript 1 May 21st, 2007 02:08 PM
Button acts depending on radio button values janise Access 4 March 10th, 2004 12:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.