Hello,
Can anyone share his ideas on how i can assign the values of RADIO BUTTON from a TEXT FIELD? and another value of RADIO BUTTON from a LIST/MENU?
any help is highly appreciated
Sincerely,
Francis
Put this in your text field tag:
onBlur()="myradiobutton.value=this.value"
you may have to say which of the radio button array:
onblur()="myradiobutton[2].value=this.value"
Use the same idea for the menu.
Biggus
Hello Biggus,
It doesnt work.
This is my form
<form name="form1" method="get" action="searchresults.php"> <p> </p> <p> <input type="radio" name="radiobutton" value=""> <input type="text" name="textfield" onblur()="radiobutton.value=textfield.value"> </p> <p> <input type="submit" name="Submit" value="Submit"> </p> </form>
im putting "3m" as data for textfield
the output url is like this:
http://localhost/phptest/searchresults.php?radiobutton=&textfield=3m&Submit=Submit
to be able to get the result i want the URL must be:
http://localhost/phptest/searchresults.php?radiobutton=3m&Submit=Submit
searchresults.php has the URL parameter of radiobutton
Please do help me.
sincerely,
bealot
sorry about that, I always put "()" after onBlur when it doesn't need it. Just remove the parens and all should be OK.
just a thought: you might want to make sure the radiobutton gets checked onblur...if there's anything in the textfield, that is. Otherwise, nothing will get passed for $radiobutton.