R
Rob Manger
Hi All,
I am hoping someone can help me. I am trying to setup my main page so that
when the user moves the mouse over an image, it changes the source (got this
working). When the user CLICKS on the image (it is a link to the content
page) it changes to a third image AND STAYS THERE. ie: so the iamge won't
change back to the omouseoff image. Does this make sense?
Also, how do I "preload" the images before they are even needed? eg: so the
Loading image loads immedeately.
Here is the code I have so far, which works as far is it goes, however the
"Loading" image is overwritten by the mouse off function. What am I doing
wrong? (Sorry for formatting):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script id="clientEventHandlersJS" language="javascript">
<!--
var clicked='false';
function fncover(){
if (clicked='false')
{
IMG1.src='./images/webmainlogoover.gif';
}
}
function fncoff(){
if (clicked='false')
{
IMG1.src='./images/webmainlogo.gif';
}
}
function fncclick(){
IMG1.src='./images/Loading.gif';
clicked='true';
}
//-->
</script>
</head>
<body>
<a href="Content.aspx" target="maintitle">
<img
onmouseover="return fncover()"
onmouseout="return fncoff()"
onclick="return fncclick()"
src="./images/webmainlogo.gif"
border="0"
id="IMG1"
language="javascript"
width="500" >
</a>
</body>
</html>
Thanx in advance,
Rob
(e-mail address removed)
I am hoping someone can help me. I am trying to setup my main page so that
when the user moves the mouse over an image, it changes the source (got this
working). When the user CLICKS on the image (it is a link to the content
page) it changes to a third image AND STAYS THERE. ie: so the iamge won't
change back to the omouseoff image. Does this make sense?
Also, how do I "preload" the images before they are even needed? eg: so the
Loading image loads immedeately.
Here is the code I have so far, which works as far is it goes, however the
"Loading" image is overwritten by the mouse off function. What am I doing
wrong? (Sorry for formatting):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script id="clientEventHandlersJS" language="javascript">
<!--
var clicked='false';
function fncover(){
if (clicked='false')
{
IMG1.src='./images/webmainlogoover.gif';
}
}
function fncoff(){
if (clicked='false')
{
IMG1.src='./images/webmainlogo.gif';
}
}
function fncclick(){
IMG1.src='./images/Loading.gif';
clicked='true';
}
//-->
</script>
</head>
<body>
<a href="Content.aspx" target="maintitle">
<img
onmouseover="return fncover()"
onmouseout="return fncoff()"
onclick="return fncclick()"
src="./images/webmainlogo.gif"
border="0"
id="IMG1"
language="javascript"
width="500" >
</a>
</body>
</html>
Thanx in advance,
Rob
(e-mail address removed)