Hey Acoder,
Alrighty that works right now (yay). Just got to get the server-side part going which i posted back in coldfusion. But i do got one last question to ask on this. When you click add attachment (to upload multiple files) it puts the word description really close to the file input an i was wondering how would you put some space between the word description and the file input? i been trying to figure it out by myself but i really can't get it. i figured out how to do a break (which you will see is commented out). but i can't figure out how i would just simply space it out.
Thank you so much for all the help on this :),
Rach
Alrighty that works right now (yay). Just got to get the server-side part going which i posted back in coldfusion. But i do got one last question to ask on this. When you click add attachment (to upload multiple files) it puts the word description really close to the file input an i was wondering how would you put some space between the word description and the file input? i been trying to figure it out by myself but i really can't get it. i figured out how to do a break (which you will see is commented out). but i can't figure out how i would just simply space it out.
Code:
var upload_number = 2;
function addFileInput()
{
var d = document.createElement("div");
var l = document.createElement("a");
var file = document.createElement("input");
var text = document.createElement("input");
<!--- var br = document.createElement("br");--->
var des = document.createTextNode("Description")
try {
file = document.createElement("<input type='file' name='attachment"+upload_number+"'>");
text = document.createElement("<input type='text' name='description"+upload_number+"'>");
} catch (e) {
file = document.createElement("input");
text = document.createElement("input");
}
d.setAttribute("id", "f"+upload_number);
file.setAttribute("type", "file");
file.setAttribute("name", "attachment"+upload_number);
text.setAttribute("type", "text");
text.setAttribute("name", "description"+upload_number);
l.setAttribute("id", "l"+upload_number);
l.setAttribute("href", "javascript:removeFileInput("+upload_number+");");
l.appendChild(document.createTextNode("Remove"));
d.setAttribute("id", "f"+upload_number);
d.appendChild(file);
<!--- d.appendChild(br);--->
d.appendChild(des);
d.appendChild(text);
d.appendChild(l);
document.getElementById("moreUploads").appendChild(d);
document.getElementById("uploads").value += "," + upload_number;
upload_number++;
}
Thank you so much for all the help on this :),
Rach
Comment