| Author |
HTML DOM to create file upload button(Browse)
|
Ketan Joshi
Ranch Hand
Joined: Oct 09, 2005
Posts: 66
|
|
Hello, I am using the following javascript to insert a file upload button or a browse button when the user clicks a link on the same page Here is the script <script language='JavaScript'> var i=1; function createBrowse(){ var browse=document.createElement("<INPUT TYPE='file' NAME=i>"); var brk=document.createElement("<br>"); document.body.insertBefore(brk); document.body.insertBefore(browse); i++; } </script> The body contains the following code <a href='javascript:createBrowse()' style="text-decoration:none">Upload More</a> This code helps me create browse button on the fly. However the method that I use insertBefore() is a xml DOM node method I came to know abt this method from some source code I am unsure as to how to use this method to create these browse buttons where I want My specific requirement is that there is a table and on clicking upload more, new row should get created with the table data being the browse button Please let me know how to achieve this Thanks ketan
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
look into insertRow() and insertCell() Eric
|
 |
 |
|
|
subject: HTML DOM to create file upload button(Browse)
|
|
|