Hi guys, I want to set the value of a textbox when someone hovers over
an image (which is hyperlinked) but to no avail. Can anyone spot the
problem here? I've wittled the code down to it's bare minimum so you
can try copying and pasting it into an htm file. Thanks a lot!
(At first I thought it might have been a scope problem in that the <a>
tag had to be within the <form> tag but that doesn't work either -
perhaps the onmouseover doesn't work with hyperlinked images?)
<html>
<head>
<script language="javascript">
function setInfoBox(tV1, tV2, tV3) {
document.infoboxform.infoBox.value = tV1 + " :: " + tV2;
}
function clearInfoBox {
document.infoboxform.infoBox.value = "";
}
</script>
</head>
<body>
<form name="infoboxform">
<input class="textbox" name="infoBox" value="Hello!" type="text"
style="text-align:center;">
</form>
<a href="index.htm" onmouseover="setInfoBox('Value 1', 'Value 2',
'Value 3')">
<img style="border: 0px"
src="http://images.amazon.com/images/P/B00006KGSG.01.LZZZZZZZ.jpg"
alt="hi!" width="30" height="30" border="1">
</a>
</body>
</html>