Please i need to know very fast if
Please i need to know very fast if
(OP)
Please i need to know very fast if u can help, can u see any problems with this bit of JavaScript code:<Script>
<!--
//Two variables created below using two images
picture1up=new Image; picture1up.src="weddings.jpg";
picture1down=new Image; picture1down.src="baby.jpg";
//Two functions follow
//Function 1 is called MouseOverRoutine
function MouseOverRoutine(image1)
{
if(image1=="picture1")
{document.picture1.src=picture1down.src;}
}
//Function 2 is called MouseOutRoutine
function MouseOutRoutine(image1)
{
if(image1=="picture1")
{document.picture1.src=picture1up.src;}
}
//-->
</script>
When i move over the image it says 'document.picture1' is not an object
Please can u help?
Regards
<!--
//Two variables created below using two images
picture1up=new Image; picture1up.src="weddings.jpg";
picture1down=new Image; picture1down.src="baby.jpg";
//Two functions follow
//Function 1 is called MouseOverRoutine
function MouseOverRoutine(image1)
{
if(image1=="picture1")
{document.picture1.src=picture1down.src;}
}
//Function 2 is called MouseOutRoutine
function MouseOutRoutine(image1)
{
if(image1=="picture1")
{document.picture1.src=picture1up.src;}
}
//-->
</script>
When i move over the image it says 'document.picture1' is not an object
Please can u help?
Regards





RE: Please i need to know very fast if
picture1up=new Image();
picture1up.src="weddings.jpg";
picture1down=new Image();
picture1down.src="baby.jpg";
...
Hope this solves your problem
P.S.: if it does,please vote for this post as being 'helpful'
Thanks, Cybex