Click to See Complete Forum and Search --> : passing form variables


sackerman
01-20-2003, 03:59 AM
I am trying to pass variables to a second page and must be forgetting something... Please help... Below is the code


thumbView.html Code:

<script language="JavaScript">

function imageViewPage() {
var val1 = ""
var val2 = ""
imageChoice.imageName.value = val1
imageChoice.imageFile.value = val2
imageChoice.submit()
}
</script>


<form name="imageChoice" action="imageView.html" method="POST">
<input name="imageName" type="hidden" value="Thumb 001.1">
<input name="imageFile" type="hidden" value="thumb001.1.jpg">
<input type="image" name="Submit" src="images/thumb001.1.jpg" width="150" height="125" alt="" border="0" onClick="imageViewPage()">
</form>


imageView.html Code:


<script language="JavaScript">
document.write("&nbsp;<img src='images/"+imageFile+"' width='450' height='375' alt='"+imageName+"' border='0'>&nbsp;") </script>

sackerman
01-20-2003, 07:17 PM
That worked wonderfully...

Thanks for the help,
Steve