| You are here: DEVPPL ‹ Forum ‹ Programming ‹ HTML Forum |
NOTIFICATIONS
|
|
|||||||||||||||
Login |
HTML Form
2 posts
• Page 1 of 1
0
HTML Form
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:
For example, for auto insurance the URL should be:
Thanks!!
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
0
Re: HTML Form
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
|
|