By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,665 Members | 1,900 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,665 IT Pros & Developers. It's quick & easy.

Mouse Over & Refresh of images ?

P: n/a
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
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In article <42********@usenet01.boi.hp.com>, me**********@hp.com enlightened
us with...
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

Jul 23 '05 #2

P: n/a
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
"kaeli" <ti******@NOSPAM.comcast.net> wrote in message
news:MP************************@nntp.lucent.com...
In article <42********@usenet01.boi.hp.com>, me**********@hp.com enlightened us with...
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

Jul 23 '05 #3

P: n/a
Mel wrote:
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);
}
<img onmouseover="stopMyTimer()" onmouseout="myTimer()" ...>
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?
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.