...

View Full Version : load image



zubamark
07-04-2002, 05:54 AM
I've created this function, it will give us more flexibility and I believe it will work in different browsers.

<SCRIPT LANGUAGE="JavaScript">

function imageError(theImage)
{
document['MisFile'].src="Eyes-01.gif"
}
</script>

</head>

<body>

<img name="MisFile" src="WOMENCAN.jpg"
onerror="imageError(this)">


</body>:rolleyes: ;)

A1ien51
07-04-2002, 07:48 AM
couldn't you do this???



<SCRIPT LANGUAGE="JavaScript">

function imageError(theImage)
{
this.src="Eyes-01.gif"
}
</script>

</head>

<body>

<img name="MisFile" src="WOMENCAN.jpg"
onerror="imageError(this)">


or even

onerror="imageError(this.src='hmmm.gif')">

mordred
07-04-2002, 05:02 PM
And another suggestion:

<SCRIPT LANGUAGE="JavaScript">
function imageError(theImage)
{
theImage.src="Eyes-01.gif";
theImage.onerror = null;
}
</script>

<img name="MisFile" src="WOMENCAN.jpg"
onerror="imageError(this)">

A1ien51
07-04-2002, 06:28 PM
lol.....see I was tired last night when I typed that!!
Thanks for seeing that mistake...lol....sleep is good



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum