Page redirect - and open within a frame

O

OnLiner

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
 
C

Csaba2000

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top