Mouse Over & Refresh of images ?

M

Mel

i have a page that refreshes every minute. i would like to cancel the
refresh when the mouse is over my image and refresh the page when the mouse
moves out of the image.

is this possible ? if so, how

thanks for your help
 
K

kaeli

[email protected] enlightened said:
i have a page that refreshes every minute. i would like to cancel the
refresh when the mouse is over my image and refresh the page when the mouse
moves out of the image.

I assume you use a timeout?
Put it in a function if you haven't.
Just cancel the timeout onmouseover and start it back up onmouseout.

Like:
function myTimer()
{
// code to start timer
}
function stopMyTimer()
{
// cancel your timer
}

<img onmouseover="stopMyTimer()" onmouseout="myTimer()" ...>

--
--
~kaeli~
Any sufficiently advanced technology is indistinguishable
from magic.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 
M

Mel

sorry for being a JS newbeee
i was using HTTP_EQUIV statement for that.

if its not too much to ask for, could you help me out with a little code
example here ?

thanks anyway for your pointer


 
R

Randy Webb

Mel said:
sorry for being a JS newbeee
i was using HTTP_EQUIV statement for that.

You know you can explicitly disable Meta Refresh in IE6?
if its not too much to ask for, could you help me out with a little code
example here ?



var myVar;

function myTimer()
{
myVar = setTimeout('changeURL()',1000)
}
function stopMyTimer()
{
clearTimeout(myVar)
}
function reloadPage(){
document.location.reload(true);
}


thanks anyway for your pointer

More pointers in my signature.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top