Thread: Radio button
View Single Post
  #7  
Old 06-25-2008, 08:39 PM
navaldesign's Avatar
navaldesign navaldesign is offline
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,357
Default Re: Radio button

Ok.

Place the two radio buttons on your form. Call them, in example, "url" . Now, right click the first and paste the following code in the Inside Tag of it's html:

onclick="changeaction1()"

Repeat for the second one, but the code should be:

onclick="changeaction2()"

Now, copy the following code and paste it in the Inside Head Tag of the Page HTML:

<script language="JavaScript" type="text/javascript">
function changeaction1()
{
document.forms[0].action = '
http://www.dbtechnosystems.com' ;
}
function changeaction2()
{
document.forms[0].action = '
http://www.navaldesign.info' ;
}
</script>
You can see, in red, the URLs that i have used in this example, replace them with your own. If you have more than two radio buttons, add code accordingly.


Test it in http://www.dbtechnosystems.com/Tips/change_action.php


__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Reply With Quote