SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    I'm baaaaaaaaaaaaack! Fluffykins's Avatar
    Join Date
    Aug 2000
    Location
    Manchester, UK
    Posts
    1,046
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JavaScript Page Redirection in Frames: How?

    Hi All

    I've a problem with an amendment to a client's site they've asked for and i'm half way to solving it but have reached an impass.

    Basically they're after a short, automated tour of 10 or so pages of their website that a visitor can get shown around without having to click anything.

    My solution to solving this is a framed page, with a header on the top frame telling them it's an automatic tour with a link back to the main site, and then some clever scripting that loads different pages into the bottom frame as time passes to compile the tour.

    I've found some JS code that lets you jump one page to another, but i've not been able to work out how to load different pages into a particular frame without having to use seperate frame-sets and seperate copies of each page in the tour with re-direction code in.

    Is there some code available that'll load a series of different pages into the bottom frame at pre-defined intervals? Any help here would be greatly appreciated

    Ady
    v-technologies - Freelance Goodness.

  2. #2
    SitePoint Evangelist compwizard's Avatar
    Join Date
    May 2002
    Location
    United States
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you could use the settimeout() function and load all of the pages into a array at the begining

  3. #3
    SitePoint Addict ThomasAesir's Avatar
    Join Date
    May 2002
    Location
    Sydney, Australia
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is how you load a page into a frame:

    frameset
    <html><head>
    <frameset ROWS =30%,*>
    <frame src="1st.html" NORESIZE name="frame1">
    <frame src="2nd.html" name="frame2">
    </frameset>
    </head></html>


    1st.html page
    <html>
    <head>
    <script Language="JavaScript">
    function loadPage(){
    parent.frame2.location.href = "http://google.com/";
    }
    </script>
    </head>
    <body>

    <form><input type=button onClick="loadPage()" Value="load Google.com!"></form>

    </body></html>
    Thomas Oeser - Blueprint Software
    Web Scripting Editor v 5.2 One cool Web editing tool.
    3dcomputergraphics.com Coming Soon!


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
  •