Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Frame re-load Question
- From: javascript@xxxxxxxxxx (Peter Brunone)
- Subject: [Javascript] Frame re-load Question
- Date: Tue, 18 Dec 2001 13:01:36 -0600
Tim,
This will be a two-part solution. First, you need to include some
Javascript in the indexed page, along the lines of
if(top.location.href == window.location.href) {
top.location.href = "frameset.html?currentpage=thispage.html";
}
Next, you need to set up your frameset to receive the querystring
variable "currentpage" that contains the proper page to host in the
frameset. This is much simpler if you have access to a server-side
development environment such as ASP or CGI; you can simply write the correct
page name into the SRC attribute of the correct frame. If however you have
only client-side Javascript, you will need to parse window.location.href to
find the part after "currentpage=", and then change the location of the
proper frame, e.g.
var myCriteria = window.location.href;
myCriteria = myCriteria.substring(myCriteria.indexOf("currentpage=") +
"currentpage=".length, myCriteria.length);
I've had trouble getting a script in the frameset page to change the
location of an existing frame, but you can always use Javascript to
document.write the entire frameset to the page...
Cheers,
Peter
----- Original Message -----
From: "Tim Makins" <timothy@xxxxxxxxxxxxxxx>
To: <javascript@xxxxxxxxxx>
Sent: Tuesday, December 18, 2001 10:55 AM
Subject: [Javascript] Frame re-load Question
| Is there any way that if someone finds a page through a search engine that
| should belong in a frame-set, the page would automatically reload itself
| into the frame set ?
|
| The key point here is that when the frameset is brought up, it should
| display the 'found' page in correct position, rather than the frameset's
| normal starting page.
|
| Tim in Ireland, hoping this is clearer than mud.
|
|
| _______________________________________________
| Javascript mailing list
| Javascript@xxxxxxxxxx
| https://lists.LaTech.edu/mailman/listinfo/javascript
|
- Follow-Ups:
- [Javascript] Frame re-load Question
- From: Tim Makins
- [Javascript] Frame re-load Question
- References:
- [Javascript] Frame re-load Question
- From: Tim Makins
- [Javascript] Frame re-load Question
- Prev by Date: [Javascript] Frame re-load Question
- Next by Date: [Javascript] Click on link to generate text in a textarea?
- Previous by thread: [Javascript] Frame re-load Question
- Next by thread: [Javascript] Frame re-load Question
- Index(es):