Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms 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 May 11th, 2004, 05:55 AM
Registered User
 
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Radio Buttons

I need to run some server side code thet recognises which radio button in a group is checked. I do a similar thing for a check box using

set objChkSpec = document.all("ChkBox")
if objChkSpec.Checked then
else
end if

however, my radio buttons are in a group and I need to access the value property and not the checked property.

How do I do this, without getting 'object doesn't support this property or method'?


 
Old June 5th, 2004, 04:27 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

submit the current form to another page and check there. Once a form is submitted, the checkbox value is submitted.
<input type="checkbox" name="chk1" value="Y">Y

'if request("chk1")="Y" then
'do code
'end if


 
Old June 6th, 2004, 04:34 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You want to do this in server-side code?

<%
Dim strCountry
strCountry = Request.Form("radCountry")

If Len(strCountry) > 0 then
Response.Write("You selected: " & strCountry & "<br />" & vbCrLf)
End If
%>

Here you would have a set of radio buttons with the name radCountry

Cheers
Ken

Microsoft MVP - Windows Server (IIS)
www.adOpenStatic.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Radio Buttons and Calculations Student101 Java Basics 4 June 21st, 2009 11:02 AM
validation in radio buttons MunishBhatia ASP.NET 2.0 Professional 5 December 11th, 2007 11:15 AM
Radio buttons disappear JoeBob49 ASP.NET 2.0 Basics 2 November 27th, 2006 09:57 AM
How to use the radio buttons? ben_VB VB.NET 2002/2003 Basics 1 January 18th, 2005 12:29 PM
Radio buttons over email??? morpheus Classic ASP Basics 5 April 20th, 2004 01:21 PM





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