Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


Extended HTML Forms



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> JavaScript Forum
View previous topic :: View next topic  
Author Message
sbrown68



Joined: 19 May 2007
Posts: 13

PostPosted: Tue May 29, 2007 1:59 am    Post subject: Extended HTML Forms Reply with quote

I have an option on my site which allows a user to enter one or many responces. I would like to give the user the option to enter each responce in a new text box but I would prefer not to have many text boxs on my site when there is a chance they may only need one.

I would like to allow the user to click a button which will generate a new input box for each entry. How can this be done...

Thanks
Back to top
View user's profile Send private message
mwa103
100+ Club


Joined: 07 Mar 2005
Posts: 206

PostPosted: Thu May 31, 2007 3:57 am    Post subject: Re: Extended HTML Forms Reply with quote

There are two options I know of to do what you want. Each has it's pros and cons, it's just a matter of deciding which one works good for you.

1. Create a bunch of boxes and hide them using css & javascript until needed
Sample

2. Dynamically create each element using javascript and add them to the page (DHTML)
Sample

1 is a little easier to code, but 2 ensures that only the number of fields you need are created. If you need more info on either of these, post back and I'll try to walk you through the code.

Hope this helps.
-Mike
Back to top
View user's profile Send private message MSN Messenger
sbrown68



Joined: 19 May 2007
Posts: 13

PostPosted: Fri Jun 01, 2007 12:26 pm    Post subject: Re: Extended HTML Forms Reply with quote

You know your stuff Mike! I took your second option and played around with it and got it working.

Thanks for your help!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> JavaScript Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap