|
-
Sep 6th, 2003, 04:03 PM
#1
Thread Starter
Frenzied Member
Making the bottom Frame refresh from the top frame... [RESOLVED]
How do you make the bottom frame refresh after every 310 seconds from the top frame ? or how would i make the bottom frame reload from a list of urls in the top frame every 310 seconds?
Say if i used this...
Code:
<script>
var pup=new Array()
pup[0]="530740" //Druchii-lord
var winfeatures="scrollbars=1,resizable=1,toolbar=1,location=1,menubar=1,status=1,directories=1"
function loadpup(){
win2=window.open("http://216.22.4.47/page.php?x=" + pup[Math.floor(Math.random()*(pup.length))],"",winfeatures)
win2.blur()
window.focus()
}
loadpup()
</script>
And modified it somehow to refresh the bottom frame every 310 seconds... Is this possible?
If so HOW ????????????????????????????
Last edited by thegreatone; May 20th, 2005 at 01:21 PM.
Zeegnahtuer?
-
Sep 6th, 2003, 06:32 PM
#2
Lively Member
i wonder if u can just use a target with the
PHP Code:
<META HTTP-EQUIV="refresh" content="0; url=homepage.htm">
meta tag.
oh, and this really shouldnt be in PHP if u wanna do it in JS.

-morrowasted
-
Sep 6th, 2003, 09:40 PM
#3
Stuck in the 80s
If you want it to continuously refresh itself, then I think morrowasted's idea of using a <meta> tag would be the best idea. The frame would actually be refreshing itself, but that shouldn't matter if you just want it refresh on a regular interval.
Which makes sense if you're talking about your chat script you're making.
-
Sep 7th, 2003, 07:07 AM
#4
Thread Starter
Frenzied Member
No no no...
Firstly it is a different project...
What i mean is that from the top frame on my page open another page from a list into the bottom frame.
How would i go about doing this?
Say from the code example i gave it allows the page to be randomly selected, but i want it to randomly select an url and load it into the bottom frame, i want it to do this every 310 seconds...
HOW ?
-
Sep 7th, 2003, 07:53 AM
#5
Stuck in the 80s
I posted a solution to this on the other thread you have. The code is:
Code:
<script type="text/javascript">
time = 310000; //310 seconds
link = 'topframe.html'; //page you want to go to
setTimeout('refreshtop()', time);
function refreshtop() {
parent.document.frames('topFrame').location.href = link;
setTimeout('refreshtop()', time);
}
</script>
For an explaination, go view the other thread.
-
Sep 15th, 2003, 05:40 AM
#6
Thread Starter
Frenzied Member
-
Sep 15th, 2003, 06:40 AM
#7
Lively Member
http://www.raketje.com coming..............soon................
-
Sep 15th, 2003, 08:13 AM
#8
Stuck in the 80s
The code I provided worked perfectly for me. You must be doing something wrong.
Here it is again (just fixed a bit):
Code:
<script type="text/javascript">
time = 310000; //310 seconds
link = 'topframe.html'; //page you want to go to
function refreshtop() {
parent.document.frames('topFrame').location.href = link;
}
setTimeout('refreshtop()', time);
</script>
If it doesn't work for you, then you are not explaining your problem well.
-
Sep 15th, 2003, 11:04 PM
#9
Yeah, I posted one in the other thread too, and it works fine.
Last edited by kows; Sep 15th, 2003 at 11:12 PM.
-
Sep 16th, 2003, 09:31 AM
#10
Stuck in the 80s
-
Sep 17th, 2003, 02:24 PM
#11
Thread Starter
Frenzied Member
Still something wrong...
Yes their is still something wrong i have scrapped the fact that i want it to reload in the top frame its too hard and nothing seems to work..
So how about refreshing into an I-Frame?
Is this any easier?
Any ideas?
-
Sep 17th, 2003, 05:59 PM
#12
Stuck in the 80s
Re: Still something wrong...
Originally posted by thegreatone
Yes their is still something wrong i have scrapped the fact that i want it to reload in the top frame its too hard and nothing seems to work..
It is NOT hard. The code we gave you WORKS. YOU must be doing something wrong.
Why don't you post your FULL CODE that ISN'T working and we can problably point what YOU'RE doing wrong.
Originally posted by thegreatone
So how about refreshing into an I-Frame?
Is this any easier?
Any ideas?
It would be the EXACT same method.
-
Sep 17th, 2003, 06:01 PM
#13
Stuck in the 80s
Wait a minute...since this is the PHP forum...you aren't trying to run that JavaScript code I gave you as PHP, are you...?
-
Sep 17th, 2003, 06:50 PM
#14
Dude, the PHP and JS scripts I replied to you were using an IFrame, and they work fine, I even posted an example on my own server that used the exact scripts I posted. You have to be doing something wrong; the scripts all work fine.
http://www.vbforums.com/showthread.p...52#post1516952
I'm guessing you're new to programming.. because all of the signs are there.
-
Sep 17th, 2003, 06:58 PM
#15
Stuck in the 80s
I don't think he knows what he's doing. In ALL of his threads (refreshing a frame or not), he's never gotten back and said that it works. I think somebody skipped basics and is trying to just jump in somewhere.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|