RadioButtons & Some funky JavaScript

  Bob The Nob© 22:28 05 Mar 2009
Locked

Right, I am trying to integrate a Glype Proxy & Search in on page, depending on what Radio Button is pressed. I have it all working apart from one option that still needs to change in order for it to work properly.

Working Search:
p> form class="form"> input type="hidden"/>
input name=hl type=hidden value=en>
input type="text" name="q" id="input" maxlength=2048 size=45 class="textbox">
input type=submit value="Go"> br>
INPUT type='radio' name='myradio' value='Search' onClick='this.form.action="gl/includes/process.php?action=update"; this.form.method="post"; this.form.onsubmit="return updateLocation(this)"; this.form.name="s";'>prox
INPUT type='radio' name='myradio' value='Search' onClick='this.form.action="click here"; this.form.method="submit"; this.form.name="f";'>Search /form>

Working Proxy:

p> form class="form"> input type="hidden"/>
input name=hl type=hidden value=en>
input type="text" name="u" id="input" maxlength=2048 size=45 class="textbox">
input type=submit value="Go"> br>
INPUT type='radio' name='myradio' value='Search' onClick='this.form.action="gl/includes/process.php?action=update"; this.form.method="post"; this.form.onsubmit="return updateLocation(this)"; this.form.name="s";'>prox
INPUT type='radio' name='myradio' value='Search' onClick='this.form.action="click here"; this.form.method="submit"; this.form.name="f";'>Search /form>


the only difference is the text box name from q to u, this is to do with what the PHP string option thingy is, I just need to know how to make the radio buttons change the textbox name.

Thanks, sorry if this is confusing or longwinded.

  Bob The Nob© 22:30 05 Mar 2009

oh, by the way, PCA remove all opening arrows <<< if they show?!

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Fujitsu Lifebook P727 laptop review

Best of the Grad Shows 2017: University of the West of England (UWE)

Best value Mac: Which is the best £1249 Mac to buy

Les meilleures GoPro 2017