Web Design and Development Forums

Show/hide/add textfields from dropdownmenu

This is a discussion on "Show/hide/add textfields from dropdownmenu" within the JavaScript Forum section. This forum, and the thread "Show/hide/add textfields from dropdownmenu are both part of the Program Your Website category.


Go Back   Webforumz.com > Program Your Website > JavaScript Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Apr 9th, 2008, 08:36   #1 (permalink)
New Member
 
Join Date: Apr 2008
Location: Netherlands
Age: 26
Posts: 1
Show/hide/add textfields from dropdownmenu

Hi guys

I need some help.

I'm making a contact form.

The thing where Iam stuck is that, I want to create a dropdown menu, with when the normal option is selected (number 1 in dropdown) it should show 2 textfields, but when selected option nr:3, it must show 3 times 2 textfiels.
This is the code how it should look like.

The part highlighted is the part with the dropdown selection and textfields. (all of it in dutch).

Hope someone can help me with this.


Code: Select all
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head>
<body> <form action="" method="post" name="inschrijven" id="inschrijven"> <table width="450" border="0"> <tr> <td><strong> Ik boek voor de volgende reis: </strong></td> <td><input name="freis" type="text" id="freis" /></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td><label>Reisdatum:</label></td> <td><input name="freisdatum" type="text" id="freisdatum" /></td> </tr> <tr> <td><label>Vertrekdatum:</label></td> <td><input name="freisdatum" type="text" id="freisdatum" /></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td><strong> Gegevens van de hoofdboeker:</strong></td> <td>&nbsp;</td> </tr> <tr> <td><label>Naam:</label></td> <td><input name="naam" type="text" id="fnaam" /></td> </tr> <tr> <td><label>Achternaam:</label></td> <td><input name="achternaam" type="text" id="fachternaam" /></td> </tr> <tr> <td><label>Adres:</label></td> <td><input name="adres" type="text" id="fadres" /></td> </tr> <tr> <td><label>Postcode:</label></td> <td><input name="postcode" type="text" id="fpostcode" /></td> </tr> <tr> <td><label>Woonplaats:</label></td> <td><input name="woonplaats" type="text" id="fwoonplaats" /></td> </tr> <tr> <td><label>Telefoon:</label></td> <td><input name="telefoon" type="text" id="ftelefoon" /></td> </tr> <tr> <td><label>Email:</label></td> <td><input name="email" type="text" id="femail" /></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td><strong>Hoeveel personen:</strong></td> <td>&nbsp;</td> </tr> <tr> <td><label>Volwassenen:</label></td> <td><select name="volwassenen" size="1" id="fvolwassenen"> <option value="fnul">0</option> <option value="feen">1</option> <option value="ftwee">2</option> <option value="fdrie">3</option> <option value="fvier">4</option> <option value="fvijf">5</option> </select></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td><strong>Mede-reizigers per persoon:</strong></td> <td>&nbsp;</td> </tr> <tr> <td><label>Naam persoon:</label></td> <td><input name="naam2" type="text" id="fnaam2" /></td> </tr> <tr> <td><label>Achternaam persoon:</label></td> <td><input name="achternaam2" type="text" id="fachternaam2" /></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td><strong>Indien van toepassing:</strong></td> <td>&nbsp;</td> </tr> <tr> <td><label>Ik boek deze reis</label></td> <td><input name="wel" type="radio" value="wel" /> wel <input name="niet" type="radio" value="niet" /> niet, als privé-reis.</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td><strong>Overige informatie<br /> en/of dieetwensen:</strong></td> <td>&nbsp;</td> </tr> <tr> <td><textarea name="overige" cols="35" rows="5" id="foverige"></textarea></td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td><div align="right"> <input name="Verzenden" type="submit" value="Verzenden" /> </div></td> <td><input name="Velden legen" type="reset" value="Legen" /></td> </tr> </table> </form> </body> </html>
UD2006 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Show Hide with JS abis123 JavaScript Forum 4 Dec 13th, 2007 05:39
[SOLVED] Show&amp;Hide Div Box Maska JavaScript Forum 6 Oct 1st, 2007 11:04
Show/Hide JS pa007 JavaScript Forum 0 Apr 6th, 2007 19:18
Show and Hide Text - how do I do that? Love2Java JavaScript Forum 1 Mar 29th, 2007 00:23
Show/Hide Div Help Trebz JavaScript Forum 2 Feb 21st, 2006 22:37



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 11:33.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59