It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

HTML Form

HTML Form

Postby SteveJo on Tue Jan 17, 2012 10:04 am

Hi,
I'm trying to create a form with two boxes for an insurance site. I want that in the first box the user will select the type of insurance and in the second box type the zip code. For every insurance type, the surfer will be directed to a different URL.

This is the code that I have, but of course that it doesn't work:
Code: Select all
<form name="mainform">
        <tr>
            <td colspan="2">
                <select name="src" id="type">
                    <option value="http://www.mysite.com/results-car.html">Auto</option>
                    <option value="http://www.mysite.com/results-home.html">Home</option>
                    <option value="http://www.mysite.com/results-life.html">Life</option>
                    <option value="http://www.mysite.com/results-health.html">Health</option>
                    <option value="http://www.mysite.com/results-motorcycle.html">Motorcycle</option>
                    <option value="http://www.mysite.com/results-business.html">Business</option>
                </select>
            </td>
            <input type="hidden" name="source" value="google" />
        <tr>
            <td><input type="text" name="zipcode" maxlength="5" id="zip" />
</td>

        </tr>
        <tr>
            <td colspan="2" style="text-align:center;"><input type="submit" id="button" value="Go"/></td>

        </tr>

    </table>
</form>


For example, for auto insurance the URL should be:
Code: Select all
http://www.mysite.com/results-car.html?zipcode=10001&source=google


Thanks!!
SteveJo
 
Posts: 5
Joined: Thu Oct 21, 2010 8:31 am

Who is online

Users browsing this forum: No registered users and 2 guests