Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Javascript to add new rows to form
Old 01-05-2006, 05:01 PM Javascript to add new rows to form
Ultra Talker

Posts: 358
Location: Devon, UK
Trades: 4
Wondering if anyone could help me, I have seen some scripts that do this and was hoping I could implement something similar on my site.

I am creating a form for users to add MP3s to my site. These may be part of an album and I want them to be able to submit the whole album at one time instead of one at a time.

For each track there are several fields; track number (text), title (text), length (text), single (Yes/No select), Free (Yes/No select), Explicit (Yes/No select), Exclusive (Yes/No select) and price (Text).

Albums can contain upto 20 tracks, so, to keep things tidy I want to show only the first track and if they want to add more they click on an 'add track' link, which will add the next row so they can add that track. If they want to add another they click the 'add track' button again, and so on.

I would like this to limit the number of rows so only upto 20 can be added. Each of the form elements would need to be assigned a number, for example; track-title1, track-title2, track-title3 and so on. I would also like the track number to be created dynamically (eg so the first row says track 1, second says track 2 and so on).

I don't expect to find a script that does all this out of the box but something, with nice easy to understand and clean code, that I could start from would be good.

Otherwise is there someone out there who could (for a price of course) help me produce this.

TIA
Simon
recedo is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-06-2006, 07:52 PM
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
you can use the createElement() function to insert new objects in the a form, check out this page:

http://www.onlinetools.org/articles/.../chapter3.html
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Old 01-06-2006, 10:36 PM
Ultra Talker

Posts: 358
Location: Devon, UK
Trades: 4
Thanks for the link. I'll check it out.

Simon
recedo is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Javascript to add new rows to form
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11268 seconds with 12 queries