WebmasterLingo
JustEdge Dedicated Servers

Go Back   WebmasterLingo > Programming Corner
User Name
Password

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old January 23rd, 2004, 06:50 PM   #1
Interactive
Registered User
 
Join Date: Jan 2004
Location: Sierra Vista, AZ, USA
Posts: 75
Interactive is off the scale
Send a message via AIM to Interactive
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
Interactive is offline   Reply With Quote
Old January 31st, 2004, 12:47 PM   #2
WorldBuilder
Big Daddy
 
Join Date: Jan 2004
Location: Boston, MA
Posts: 380
WorldBuilder is off the scale
Send a message via AIM to WorldBuilder
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
WorldBuilder is offline   Reply With Quote
Old January 31st, 2004, 03:15 PM   #3
mttatkns
Registered User
 
Join Date: Jan 2004
Location: 92677
Posts: 26
mttatkns is off the scale
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>
mttatkns is offline   Reply With Quote
Old January 31st, 2004, 03:25 PM   #4
WorldBuilder
Big Daddy
 
Join Date: Jan 2004
Location: Boston, MA
Posts: 380
WorldBuilder is off the scale
Send a message via AIM to WorldBuilder
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
WorldBuilder is offline   Reply With Quote
Old January 31st, 2004, 03:50 PM   #5
mttatkns
Registered User
 
Join Date: Jan 2004
Location: 92677
Posts: 26
mttatkns is off the scale
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...
mttatkns is offline   Reply With Quote
Old February 4th, 2004, 06:59 PM   #6
whiteknight
Registered User
 
Join Date: Jan 2004
Location: Philadelphia
Posts: 42
whiteknight is off the scale
Send a message via AIM to whiteknight
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.
whiteknight is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -5. The time now is 01:35 PM.

JustEdge Dedicated Servers