• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Javascript for generating a form element

 
Ketan Joshi
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All

I currently have a form which has one form field <input type='file'> to upload a file

I want to provide a button on the same page and if it is clicked, user should get another browse button to upload another file on the same page.

Is this possible using JavaScript or what is the best option where I can have multiple files uploaded

I dont want the page to be filled with browse boxes.They should be generated as per users choice when he clicks the button which has text "More files" on it.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64994
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can create them on-the-fly either through use of the innerHTML property, or by creating the DOM elements "by hand".
[ April 20, 2006: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic