473,320 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Page redirect - and open within a frame

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
2 1906
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ian | last post by:
I'm sure there's a really simple way to do this but I'm not really familar with javascript so a bit of help would be much appreciated. What I have currently is a php program which takes in a...
3
by: Peter | last post by:
Hi I am very new to ASP development and I have a problem that I have spent days on and cannot find a solution. Any help would be gratefully accepted. I am using VB.NET to develop a ASP.NET...
1
by: Hrvoje Vrbanc | last post by:
Hello all, here is what I'd like to do: I have an ASPX page with certain buttons that opens in its window, naturally. When any of those buttons is clicked, I'd like the action to happen in...
8
by: Judy Ward | last post by:
I have an index.aspx with frames. The top frame has a navigation bar with a "Login" hyperlink. If the user has already logged in I want this link to change to "Logout". I am using forms-based...
3
by: Shapper | last post by:
Hello, I am working on an ASP.NET/VB web site. I have several links including menu links. Considerer a want to load a page named page.aspx. I can do it using javascript. Or using this code:...
4
by: steph_mw | last post by:
I have an ASP page that has an aspx page within an iFram on this asp page. Once the user has filled in the form (within the aspx page) I need to redirect the user back to the orginating page (an...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
42
by: smerf | last post by:
Using javascript, is there a way to trap an external page inside a frame? I've seen scripts to break out of frames, but nothing to keep a page trapped in a frame.
0
by: K B | last post by:
Hi, I could be approaching this all wrong...so please let me know what you think. I have a 2 page frame (WIleft.aspx and WIright.aspx) in asp.net 2.0. I create an html page by transforming xml...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.