Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submit Form with Dynamic Inputs 1

Status
Not open for further replies.

jammer1221

Programmer
Joined
Jul 30, 2003
Messages
352
Location
US
Hello everyone,

I have a page with some form inputs that are always there, and then I have an option to "create your own" through the javascript function createElement. So after you create a new input and insert the data you want into it, you would then click submit. The problem I am having is that my created inputs are not being submitted. I could try to post some code if anyone would like to see it but the page is very long. So I will try and answer as many questions as possible on here, if you have any.
Thanks,
Matt
 
Are you appendining the inputs to the form element (or another element inside it), rather than the document, or body, or any other element outside the form?

If not, that would be why.

If that doesn't help, can you post a small test harness demonstrating the problem, or a link to a URL?

Hope this helps,
Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Dan,

I've got some LI's inside the form that I am appending but I've also tried appending directly to the form, and neither have worked when ever I submit it (I can get the created inputs to show up on the page). I'll try and get a test page up for you.
 
Dan,
I got a page up to a test server. I was having a little trouple with my database tables so I'm sorry if some of the database stuff doesn't work, but you should be able to get the jist of my problem.

To save click on Options (up near the top next to the image) and then click save.

There are two fields that are appended autmatically, next_trip and todo_list. You can create your own fields if you want (Just type their names into the name field).

This project is still in its developing stages. So I'll try and answer any questions you have.

But thank you for all the help

Matt
 
p.s. you might want to use IE...its a company intranet and everyone uses IE.
 
Well - using a DOM inspector, I can see that the major difference between those two controls and all the others, is that those two controls do not have a "name" attribute set to be the same as their id. In fact, they have no "name" attribute at all.

If you are testing server-side on the "name" attribute, then you'll be out of luck.

Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Haha wow dan, thats some good thinking. I bet thats the trick. Man I can't believe I didn't see that. Well when I get back I'll try setting a name attribute, and see how that works.

Thanks a ton for lookin at it dan.

Matt
 
Yup that did the trick Dan...thanks. If I could I'd give you more than one star.

Thanks Again,
Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top