+ Reply to Thread
Results 1 to 6 of 6

Thread: I know this is simple?

  1. #1
    Full Member Interactive is on a distinguished road
    Join Date
    Jan 2004
    Location
    Sierra Vista, AZ, USA
    Posts
    74

    I know this is simple?

    I'm by far no javascript expert and have been trying to look it up on Google for the past hour or so.

    All I need to do is to refresh a frame (Well inset frame) at say every 30 seconds. So it would just be like:
    Code:
    frame.location.href = "mypage.html";
    Or atleast something to that effect + a timer. Any ideas?
    -Robert Norton
    http://www.HostComb.com - Find The Hosting Provider That Meets Your Needs

  2. #2
    Active Member WorldBuilder is on a distinguished road
    Join Date
    Jan 2004
    Location
    Boston, MA
    Posts
    366
    I've seen this somewhere before. Lemme poke around and I'll let you know what I find, bro. I don't know JS, so I can't help personally, but perhaps I can find an answer for ya.

    Chris
    My Site | My Blog
    "The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing."
    "Insanity is doing the same thing over and over again, expecting different results"
    --Albert Einstein

  3. #3
    Full Member mttatkns is on a distinguished road
    Join Date
    Jan 2004
    Location
    92677
    Posts
    26
    You can use a meta tag in the head of the page to do this. An example is below. I don't remember if the time is in seconds or milliseconds, so you'll have to try it to see which is correct.

    <html><head><meta http-equiv="refresh" content="30;URL=mypage.html"></head><body><font>this page will refresh in 30 seconds; <a href="mypage.html">click here</a> if you are not automatically redirected</font></body></html>

  4. #4
    Active Member WorldBuilder is on a distinguished road
    Join Date
    Jan 2004
    Location
    Boston, MA
    Posts
    366
    Mtt,

    I found what I was looking for from a thread I saw a while back at DS. I found it and was going to post the link here, but the link basically provides the very info you provide in addition to a javascript that should work if your solution doesn't. The only thing I would add (and I'm NOT sure about this) is that I THINK that what you suggests only works in IE. I could be wrong. I'll post the link to the other thread anyway.

    http://forums.devshed.com/t112281/s.html

    Interactive, let us know which solution you use, and how it works.

    Chris
    My Site | My Blog
    "The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing."
    "Insanity is doing the same thing over and over again, expecting different results"
    --Albert Einstein

  5. #5
    Full Member mttatkns is on a distinguished road
    Join Date
    Jan 2004
    Location
    92677
    Posts
    26
    What I proposed does not just work in IE; I use Firebird all the time and it's no problem at all. The only possible reason that it wouldn't work would be if someone had a really old browser, but chances are that in such a browser JavaScript would not be installed/enabled either. Either solution should work with at least 95% of people out there, but I would think my solution would work more often, considering some people have JS disabled. I wouldn't suggest using both on the same page, as it would try to redirect the user twice instead of once every 30 seconds. As Chris said, let us know how it works for you...

  6. #6
    Full Member whiteknight is on a distinguished road
    Join Date
    Jan 2004
    Location
    Philadelphia
    Posts
    42
    the meta tag refresh rate is in seconds, not milliseconds. i didnt know that java refresh objects could target an Iframe, although last time i read through the spec was a while ago.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

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