I am getting an object expected error when I try to call function first() from a button. If I put the function action inline on the onClick it works. What am I doing wrong?!?!
<html>
<script language="JavaScript"
<!--
function first()
{
document.images.test.src = "2.jpeg";
}
-->
</script>
<body>
<input type="button" onClick="first();" value="test">
<img name="test" src=".\1.jpeg">
</body>
</html>
<html>
<script language="JavaScript"
<!--
function first()
{
document.images.test.src = "2.jpeg";
}
-->
</script>
<body>
<input type="button" onClick="first();" value="test">
<img name="test" src=".\1.jpeg">
</body>
</html>