Page redirect - and open within a frame

Discussion in 'Javascript' started by OnLiner, Mar 23, 2005.

  1. OnLiner

    OnLiner Guest

    I have a site with hundreds of pages.
    I often get visits from people who have linked to individual pages and not
    to the main index page. This means that they do not have the correct
    menu/navigation system to view the rest of the site with.

    I know how to redirect them to the index page, but that means they then have
    to search the site for the page they just left.

    Is there a way using JavaScript to open the page they are currently viewing
    in the correct frame of the existing navigation system?

    TIA.

    Damian
     
    OnLiner, Mar 23, 2005
    #1
    1. Advertising

  2. OnLiner

    kaeli Guest

    In article <>,
    enlightened us with...
    >
    > I know how to redirect them to the index page, but that means they then have
    > to search the site for the page they just left.
    >
    > Is there a way using JavaScript to open the page they are currently viewing
    > in the correct frame of the existing navigation system?


    Sure, do a dynamic frameset. Best done server-side, but it can be done with
    javascript.
    http://www.ipwebdesign.net/kaelisSpace/useful_dynamicFrameset.html


    --
    --
    ~kaeli~
    A chicken crossing the road is poultry in motion.
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
     
    kaeli, Mar 23, 2005
    #2
    1. Advertising

  3. OnLiner

    Csaba2000 Guest

    One possibility (I haven't tested) is that IF you detect that you are not
    framed and you want to so redirect to a framed version, you could do
    top.location = "http://mydomain.com/myMainPage.htm?nav=thisPage.htm
    (if you want to be supercool you would do
    top.location = "http://mydomain.com?thisPage.htm and your server will
    figure out to insert index.whatever as appropriate).

    Then, when the navigation portion of your frame loads, it's going to inspect
    top.location for the exact way it was called and if it finds a ?nav=webPage.htm
    (or just ?webPage for the supercool version) that's what it will load into the
    right of the frame (hopefully you do a little bit of validation).

    Csaba Gabor from Vienna

    "OnLiner" <> wrote in message news:...
    >I have a site with hundreds of pages.
    > I often get visits from people who have linked to individual pages and not
    > to the main index page. This means that they do not have the correct
    > menu/navigation system to view the rest of the site with.
    >
    > I know how to redirect them to the index page, but that means they then have
    > to search the site for the page they just left.
    >
    > Is there a way using JavaScript to open the page they are currently viewing
    > in the correct frame of the existing navigation system?
    >
    > TIA.
    >
    > Damian
    >
    >
     
    Csaba2000, Mar 23, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bongolation
    Replies:
    3
    Views:
    542
    Bongolation
    May 30, 2004
  2. Sal
    Replies:
    1
    Views:
    843
  3. Zalek Bloom
    Replies:
    1
    Views:
    223
    Aaron Bertrand - MVP
    Sep 23, 2003
  4. Griff

    response.redirect within frame set

    Griff, Oct 14, 2005, in forum: ASP General
    Replies:
    3
    Views:
    250
    Roland Hall
    Oct 17, 2005
  5. geefypants
    Replies:
    0
    Views:
    165
    geefypants
    Oct 28, 2004
Loading...

Share This Page