Click here to Skip to main content
15,902,189 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have five button in web page. i want to open same window multiple on click on every button using javascript. means every button click open one window for fileupload.

Please suggest me.

Thanks & Regards
Ganu
Posted
Comments
Sandeep Mewara 29-Aug-12 2:01am    
It is pretty straight forward... have 5 fileupload controls. Not sure where are you stuck or what is the issue!

1 solution

Well, apart from the age-old suggestion to look at the javascript section of w3c: http://www.w3schools.com/js/default.asp[^], I'd suggest that it can be done with just a handful of elements.
This is a bare-bones page that will present 5 upload controls. I'll leave it to you to
complete the form, especially the 'type' and 'action' attributes - you need to make sure that the form is a multi-part form, you need to post the information to a back-end server page, be it ASPX, PHP, JSP, whatever.

HTML
<!DOCTYPE html>
<html>
<head>
<script>
</script>
</head>
<body>
<form>
 <input type='file' id='upload1'/><br>
 <input type='file' id='upload2'/><br>
 <input type='file' id='upload3'/><br>
 <input type='file' id='upload4'/><br>
 <input type='file' id='upload5'/><br>
</form>
</body>
</html>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900