 <p>If you want to send a parameter to another page, then you need to set the url and query string in the href tag of an a tag.</p> <p>For example:</p> <pre><code>&lt;a id="myatag" href=""&gt; &lt;!-- Whatever you want the user to click--&gt; &lt;/a&gt; </code></pre> <p>and the js:</p> <pre><code>document.getElementById("myatag").href = "OrderPrint.html?image=" + "sniperImg" + i; </code></pre> <p>Then, you can retrieve the name of the image on the server side script, and append ".jpg" or whatever extension you are using. For example, in PHP:</p> <pre><code>$image = "VideoImages/" + $_GET["image"] + ".jpg"; </code></pre>