pheealnluot
10-06-2002, 01:25 PM
<script language = "Javascript">
<!--
pica = new Image(200,200)
pica.src = "resource/title1.jpg"
picb = new Image(200,200)
picb.src = "resource/title2.jpg"
zoomspeed=0.02 // = 2% increment
function grow (picname)
{
while (document.images(picname).width < 300)
{
document.images(picname).width += (document.images(picname).width*zoomspeed)
}
}
//-->
</script>
-------------------------------------------------------------------------------
under body
<img name=home border="0" src="resource/title1.jpg" width="200" height="200"
onmouseover="grow('home')";return true
>
-----------------------------------------------------------------
i try to make title1.jpg grow by calling function grow.
however, i keep getting the error 'object Required'..
i'm sorry if it's ambigious coz i really have no idea wat's wrong with it!
is there some syntax problem which i'm not aware of?
any help is Much appreciated! THANKS
<!--
pica = new Image(200,200)
pica.src = "resource/title1.jpg"
picb = new Image(200,200)
picb.src = "resource/title2.jpg"
zoomspeed=0.02 // = 2% increment
function grow (picname)
{
while (document.images(picname).width < 300)
{
document.images(picname).width += (document.images(picname).width*zoomspeed)
}
}
//-->
</script>
-------------------------------------------------------------------------------
under body
<img name=home border="0" src="resource/title1.jpg" width="200" height="200"
onmouseover="grow('home')";return true
>
-----------------------------------------------------------------
i try to make title1.jpg grow by calling function grow.
however, i keep getting the error 'object Required'..
i'm sorry if it's ambigious coz i really have no idea wat's wrong with it!
is there some syntax problem which i'm not aware of?
any help is Much appreciated! THANKS