|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
I try to change "checked" property of the radio buttons when I click on the text box.
Here is my code: <form name="form1" method="post" action="response.asp"> <input type="radio" name="radiosample" checked>Sample #1<br> <input type="radio" name="radiosample">Sample #2<br> <input type="radio" name="radiosample" >Sample #3<br> <input type="text" size="20" name="text_box" onClick="Check_radio()"> </form> <script language="vbScript"> Sub Check_radio() form1.radiosample.checked(2)= True End Sub </script> I am getting an error: "Object doesn't support this property or method "form1.radiosample.checked'. What is wrong? I would appreciate any help! |
|
#2
|
|||
|
|||
|
Hi mate,
You just have the syntax slighty wrong. Here you go: <script language="vbScript"> Sub Check_radio() form1.radiosample(2).checked= True End Sub </script> The index for an array starts at 0 so, in your example, radiosample(2) points to the 3rd radio button in the group. Andrew |
|
#3
|
|||
|
|||
|
Yes!!!!! I got it!
Thank you so much!!! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > text box and radio buttons doesn't work together?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|