SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict Limes102's Avatar
    Join Date
    Sep 2006
    Location
    North Wales
    Posts
    242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Refresh with Ajax

    Hi, I have only written one thing ever in JavaScript, and that was very basic. But I am now writing a site with an iframe, i want the iFrame to refresh every say 6 seconds, but without using meta (because of the clicking).

    I have herd I could use Ajax to do this, but I don't know how.... he he
    If anyone could give me a hand at writing something to make it refresh, it would be much appreciated

    Thanks in advanced
    --Aaron
    Last edited by Limes102; Feb 24, 2007 at 13:01.

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but without using meta (because of the clicking
    What clicking?

    Try this:
    Code:
    window.onload = function()
    {
    	setInterval(myFunc, 6000);	
    }
    
    function myFunc()
    {
    		window.frames["iframeName"].location.reload();
    }


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •