By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,776 Members | 1,322 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,776 IT Pros & Developers. It's quick & easy.

Page redirect - and open within a frame

P: n/a
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
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
In article <3a*************@individual.net>, pe**********@pickledpepper.com
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/kaelisSpa...cFrameset.html
--
--
~kaeli~
A chicken crossing the road is poultry in motion.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2

P: n/a
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" <pe**********@pickledpepper.com> wrote in message news:3a*************@individual.net...
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

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.