wood burning stoves
The moose likes HTML, CSS and JavaScript and the fly likes HTML DOM to  create   file upload button(Browse) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "HTML DOM to  create   file upload button(Browse) " Watch "HTML DOM to  create   file upload button(Browse) " New topic

HTML DOM to create file upload button(Browse)

Ketan Joshi
Ranch Hand

Joined: Oct 09, 2005
Posts: 66

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>");

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

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
look into insertRow() and insertCell()

I agree. Here's the link: http://aspose.com/file-tools
subject: HTML DOM to create file upload button(Browse)
It's not a secret anymore!