Results 1 to 15 of 15

Thread: Making the bottom Frame refresh from the top frame... [RESOLVED]

  1. #1

    Thread Starter
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    Arrow 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?

  2. #2
    Lively Member morrowasted's Avatar
    Join Date
    Aug 2003
    Location
    Houston, TX
    Posts
    118
    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

  3. #3
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    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.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  4. #4

    Thread Starter
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    Unhappy 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 ?
    Zeegnahtuer?

  5. #5
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    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.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  6. #6

    Thread Starter
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333
    None of the above seem to work for me...

    oh yeah and i need to actually display the page not just write a text link...

    HELP

    Zeegnahtuer?

  7. #7
    Lively Member
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    96
    edit
    http://www.raketje.com coming..............soon................

  8. #8
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    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.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  9. #9
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629
    Yeah, I posted one in the other thread too, and it works fine.
    Last edited by kows; Sep 15th, 2003 at 11:12 PM.
    Like Archer? Check out some Sterling Archer quotes.

  10. #10
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    My evil laugh has a squeak in it.

    kristopherwilson.com

  11. #11

    Thread Starter
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    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?
    Zeegnahtuer?

  12. #12
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    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.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  13. #13
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    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...?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  14. #14
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629
    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.
    Like Archer? Check out some Sterling Archer quotes.

  15. #15
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    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.
    My evil laugh has a squeak in it.

    kristopherwilson.com

Posting Permissions

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



Click Here to Expand Forum to Full Width