Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


refresh image source only



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> JavaScript Forum
View previous topic :: View next topic  
Author Message
Opaque



Joined: 13 Dec 2006
Posts: 1

PostPosted: Wed Dec 13, 2006 9:11 pm    Post subject: refresh image source only Reply with quote

I would like to refresh the following code only, every 5 seconds.

The code sends a variable to a php script. user=atodd is the variable and must stay in the code.

<img src="is_online/is_online.php?user=atodd"/>

Any help would be greatly appreciated.
Back to top
View user's profile Send private message
ngpgeeta



Joined: 18 Nov 2006
Posts: 19

PostPosted: Sun Dec 17, 2006 9:24 am    Post subject: Re: refresh image source only Reply with quote

<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script>
function calling()
{
timer=setTimeout("imgrefresh()",5000)
}
function imgrefresh()
{
g.innerHTML="<img src='one.jpg' width=100 height=300>"
clearTimeout(timer)
}
</script>
</HEAD>

<BODY onload="calling()">
<div id="g"></div>
</BODY>
</HTML>

This will load the image after 5 sec. If you want continous loading of the image, after the line clearTimeout(timer), write calling(). This will again call imgrefresh after every 5 seconds. Take care if you call calling() continously, this may hang your system.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> JavaScript Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap