Results 1 to 2 of 2

Thread: Submit Button Going to Radio Button URL Value.

  1. #1
    Join Date
    Jan 2011
    Location
    New York, New York
    Posts
    1

    Submit Button Going to Radio Button URL Value.

    How would i get the submit button of a form to go to a radio button url value. Ive been trying to find it online but it seems its never happened to anyone before.
    Here is an example :

    <form name="size" method="post" action="">
    <input type="radio" name="Size21" value="/ShoppingCart.asp?ProductCode=SLI-Dirk-0004">
    <input type="radio" name="Size21" value="/ShoppingCart.asp?ProductCode=SLI-Dirk-0005">

    <input type="submit">
    </form>

    Is there some php or cgi that i could write to parse these values to attach as the form action?
    Thanks

  2. #2
    Join Date
    Jan 2011
    Posts
    24
    You could add a onSubmit attribute on your form element. Use it to call a JavaScript method, which redirects to the value of the selected radio button, as described here:
    http://www.somacon.com/p143.php

Similar Threads

  1. Radio button validation using javascript
    By Muneeb in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 21 Sep 2010, 07:53 AM
  2. php radio button form for a poll
    By ketanco in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 27 Sep 2008, 05:03 PM
  3. Radio button disable?
    By HockeyFan in forum Tutorials
    Replies: 1
    Last Post: 31 Oct 2005, 01:26 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •