[Javascript] RE: radio button problem

J.R. Pitts listuser at wjponline.com
Wed Mar 19 08:17:14 CST 2003


You need to use the onclick handler, like this link where I call the
"chgForm()" function with a passed parameter of 2 when someone clicks on it.

<code snippet>
	<input type="radio" name="radQ1" value="FAM" onClick="chgForm(2)">
</code>

The function can then do whatever you need it to.

When you say "on your ASP page".... if you need this value server-side,
you'll have to stuff into a form value somewhere and submit the form.

J.R. Pitts
http://www.wjponline.com


-----Original Message-----
From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
Behalf Of Alan Easton
Sent: Wednesday, March 19, 2003 7:17 AM
To: 'Java-List'
Subject: radio button problem


Hi All,

My problem is this. I have 2 radio buttons on my ASP page, both have
different values. I want the user to be able to select the appropriate radio
button, and as they select it, I need a variable on the page to change to
that value of the radio button that they have just selected.

The variable is then used further on in the application.

What is the best way to do this.

Any help is as always appreciated.

Many Thanks,

Alan...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 1176 bytes
Desc: not available
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20030319/8f8b347d/attachment.bin>


More information about the Javascript mailing list