I want to display the image below.
<img src="http://gfx.myview.com/MyView/skins/livesample/image/livesample.gif" alt="" border="0"><a/>
Than when the image is clicked it should run the code below. How do I code this properly so that only the image is displayed and when clicked it runs the remaining code below to open the form.
<script type="text/javascript">
function goToPage() {
var s1 = document.getElementById('s1').value;
var s2 = document.getElementById('s2').value;
var s3 = document.getElementById('s3').value;
var s4 = document.getElementById('s4').value;
window.location = "http://igaintrk.com/?E=BjcJU6NSsab3xCmBOyZgJw%3d%3d&s1=" + s1 + "&s2=" + s2 + "&s3=" + s3 + "&s4=" + s4 ;
}
</script>
Please Enter Your
<label for="s2">First Name:</label>
<input type="text" id="s2" />
<label for="s3">Last Name:</label>
<input type="text" id="s3" />
<label for="s1">E-mail:</label>
<input type="text" id="s1" />
<label for="s4">Zipcode:</label>
<input type="number" id="s4" />
<a href="JavaScript:goTOPage()"><img src="http://gfx.myview.com/MyView/skins/livesample/image/livesample.gif" alt="" border="0"><a/>
<script type="text/javascript">
var frmvalidator = new Validator("myform");
frmvalidator.addValidation("FirstName","req","Please enter your First Name");
frmvalidator.addValidation("FirstName","maxlen=20",
"Max length for FirstName is 20");
frmvalidator.addValidation("LastName","req");
frmvalidator.addValidation("LastName","maxlen=20");
frmvalidator.addValidation("Email","maxlen=50");
frmvalidator.addValidation("Email","req");
frmvalidator.addValidation("Email","email");
frmvalidator.addValidation("Zipcode","maxlen=5");
frmvalidator.addValidation("Zipcode","req");
</script>