troubleshooting Question

How do I pass an array via HREF using document.getElementById().value

Avatar of brianbish
brianbish asked on
JavaScriptScripting LanguagesPHP
4 Comments2 Solutions695 ViewsLast Modified:
How do I pass an array via HREF using document.getElementById().value and an Onclick event?
<script language="javascript" type="text/javascript">
function subcatid(x) {
var var1=x;
window.location.href = ( 'manage_products.php?var1='+var1);
}
</script>
<html>
<body>
<table> 
<tr>
                                    <td >Image 1: <input size="40" type="file" name="file[]" id="image1"/>									</tr>
                                        <tr>
 
                                      <td >Image 2:
 
                                      <input size="40" type="file" name="file[]" id="image2" /></td>
                                    </tr>
 
                                    <tr>
 
 
                                      <td >Image 3:
 
                                      <input size="40" type="file" name="file[]" id="image3" /></td>
                                    </tr>
 
                                    <tr>
 
                                      <td >Image 4:
 
                                      <input size="40" type="file" name="file[]" id="image4" /></td>
                                    </tr>
 
                                    <tr>
 
                                      <td >Image 5:
 
                                      <input size="40" type="file" name="file[]" id="image5" /></td>
                                    </tr>
 
                                    <tr>
 
                                      <td >Image 6:
 
                                      <input size="40" type="file" name="file[]" id="image6" /></td>
                                    </tr>
 
                                    
                                     
</table>
  <input name="submit" type="button" value="Add"  onclick="subcatid(file[])"/>
 
</body>
</html>
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros