It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Please Help! Multifile Upload script

Please Help! Multifile Upload script

Postby Pongo on Fri Mar 18, 2011 7:55 pm

Hello,
I have this script below that will allow a user to upload multiple images. I need to have it add another text box each time it adds a new upload box. The new text box will be for the user to add a tag or description of the image.

How do I add a new text box and retrieve the text they enter with each image?


<!-----function AddMoreImages() {
if (!document.getElementById && !document.createElement)
return false;
var fileUploadarea = document.getElementById("fileUploadarea");
if (!fileUploadarea)
return false;
var newLine = document.createElement("br");
fileUploadarea.appendChild(newLine);
var newFile = document.createElement("input");
newFile.type = "file";
newFile.setAttribute("class", "fileUpload");




if (!AddMoreImages.lastAssignedId)
AddMoreImages.lastAssignedId = 100;
newFile.setAttribute("id", "FileUpload" + AddMoreImages.lastAssignedId);
newFile.setAttribute("name", "FileUpload" + AddMoreImages.lastAssignedId);
var div = document.createElement("div");
div.appendChild(newFile);
div.setAttribute("id", "div" + AddMoreImages.lastAssignedId);
fileUploadarea.appendChild(div);
AddMoreImages.lastAssignedId++;


}

---->


Thank You
:x :?:
Pongo
 
Posts: 1
Joined: Fri Mar 18, 2011 7:52 pm

Who is online

Users browsing this forum: No registered users and 6 guests