You are here: DEVPPL Forum Programming HTML Forum
NOTIFICATIONS
54.091
MEMBERS
15.687
TOPICS
62.261
POSTS
  562
FLASH GAMES
7.740
TUTORIALS
 

Login

E-mail:
Password:

HTML Form

0

Loading

HTML Form

Postby SteveJo » Tue Jan 17, 2012 11: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
 
Reputation: 0
Posts: 5
Joined: Thu Oct 21, 2010 9:31 am
Highscores: 0
Arcade winning challenges: 0

HTML Form - Sponsored results

Sponsored results

Login to get rid of ads

 

0

Loading

Re: HTML Form

Postby Instinct » Thu May 31, 2012 2:23 pm

Your going to have to look into Javascript. I recommend this website http://www.tizag.com
Instinct
 
Reputation: 0
Posts: 92
Joined: Tue Mar 27, 2007 2:07 pm
Location: St Helens, England
Highscores: 0
Arcade winning challenges: 0
^ Back to Top