|
-
Dec 21st, 2005, 03:30 PM
#1
Thread Starter
Hyperactive Member
{Resolved}Radiobutton
Hi,
On my ASP form I have:
5 options (radio)
- Summer
- Winter
- Fall
- Spring
- None
I have 1 input box (txtActivities)
When the user picks "None", I want in javascript to clear txtActivities.
How do I do that?
I try many event of the "None" radio but nothing works.
Thanks.
EDIT: when doing " onClick= "javascript: this.txtActivities.value = '';"
I get the error saying this.txtActivities as null value or objet does not exist.
But it exists.
EDIT:
The problem was " this " for the form was not good in the event of the radio button. I had to use the real form name " javascript: formSeason.txtActivities.value = '';" and it works.
Thanks for your help.
Last edited by dbelley_office; Dec 22nd, 2005 at 10:23 AM.
-
Dec 21st, 2005, 06:16 PM
#2
Lively Member
Re: Radiobutton
Try This
<FORM NAME="Form1">
<INPUT NAME="Text1" TYPE="TEXT" value="i clear when none is pressed"><br>
None<INPUT NAME="None" TYPE="radio" onclick="document.Form1.Text1.value=''"><br>
</FORM>
*********** "why do things that are suspose to bad for us taste so good, whats ur addiction"
Kanye West **********
-
Dec 22nd, 2005, 08:48 AM
#3
Re: Radiobutton
Make sure the textbox has an id attribute, and then you can use
document.getElementById('txtboxid').value='';
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|