By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,044 Members | 1,377 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,044 IT Pros & Developers. It's quick & easy.

HTML - Continuous Forms

blyxx86
100+
P: 256
Good Evening Everyone,

I'm not too sure if this can be done without some intensive coding, but what I'm looking to do is seemingly simple.

I am creating some pages with forms and want the various levels within the form to repeat once data is entered into one line.

For example, let's assume we have one drop box and one text field.
Select an Item: *New Drop* Enter New Name: *Blank Field*

However once data is entered I want another line to appear below it.
Select an Item: *TV* Enter New Name: *Television*
Select an Item: *New Drop* Enter New Name: *Blank Field*

Of course this would repeat continuously. The pages are actually .php but that is serverside generation and will not know when the person has entered a value into either box. So maybe this is a job for Java? I hope not, because I don't know Java. Maybe someone can point me in the right direction? Maybe there is already code out there that will do this.

Any help is appreciated!

Thank you,
Kyle
Nov 14 '08 #1
Share this Question
Share on Google+
5 Replies


acoder
Expert Mod 15k+
P: 16,027
Not Java, but JavaScript - two very different languages. So, yes, it will require JavaScript if you want to avoid a page reload.
Nov 14 '08 #2

blyxx86
100+
P: 256
Java not equal to JavaScript... Got it! That is news to me, I wonder how many times I've called it that and truly thought it was the same. I usually say Javascript when dealing with HTML but I think I was in a hurry to make the post.

I will post in the Javascript forum (not the Java forum) to see if they can help me out there.

Do you have any alternative suggestions to this? I've thought about just having multiple lines to start with or a drop down that allows for more lines to be added, but I was afraid of losing what information had already been typed in.
Nov 14 '08 #3

acoder
Expert Mod 15k+
P: 16,027
If you want to avoid JavaScript, you can add a submit button next to the text box. The problem with this is that you'll need to submit each time you want to add a new drop down and text box.

If you want minimal JavaScript, you can use onchange to trigger a submit.

If you want more control and flexibility, then JavaScript is your best option.
Nov 15 '08 #4

blyxx86
100+
P: 256
Thank you for the advice!

For now, I think I may just use the submit button idea. However, once I am able to sit down for a little while and learn the Javascript needed I will use that.

:)
Dec 2 '08 #5

acoder
Expert Mod 15k+
P: 16,027
OK, no problem. Once you're ready and if you ever get stuck, you can post in the JavaScript forum. Good luck!
Dec 2 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.