Forum Moderators: mack
Is there a way to configure a URL so that it brings up widgets.html within the frameset?
AFAIK, no SEs interpret JavaScript yet, so they will just see the frameless page (widgets.html) and basically ignore the JavaScript.
I also might have musunderstood what you wanted to do, exactly. Do you want to not only show the original frameset front page (frameset.html), but also navigate to the document that was being viewed at the time in it's proper frame? That would make sense and others may want to do the same thing at some point, so I'll post an example of one way it could be done.
In the frameset front page head...
<script type="text/javascript">
<!--
function passToFrame(URI, frameName) {
eval("window." + frameName + ".location.href = '" + URI + "'");
}
function loaded() {
if (window.location.search.length > 1) {
var args = window.location.search.substring(1);
args = args.split("+");
var Uri = args[0];
var fN = args[1];
passToFrame(Uri, fN);
}
}
window.onload = loaded;
//-->
</script>
Then in the head of the frameless page to load into the frameset put...
<script type="text/javascript">
<!--
if (window.parent.frames.length < 1) {
window.location.href = 'http://inet/path/to/frameset.html' + '?' + self.location.href + '+' + 'frameName';
}
//-->
</script>
Make http://inet/path/to/frameset.html equal to your frameset page's full URL, and make frameName the name of the frame to load the frameless page into in the frameset page.
Hope it helps!
Jordan
Do you want to not only show the original frameset front page (frameset.html), but also navigate to the document that was being viewed at the time in it's proper frame?
I think so.
Let me try:
If I browse to [mydomain.com...] I see a page with a top banner and a left navigation bar that remain still when I scroll down on the center part of the site, ie. a framed site. If I click on the "widgets" link on the left navigation bar, then widgets.html loads into the center part of the site, replacing the original page shown there.
However, if I type in the URL [mydomain.com...] it shows widgets.html without the frames. But I want to be able to garner inbound links directly to widgets.html. When a visitor clicks on such a link and comes to widgets.html, I want them to see it loaded into the framesets declared on index.html.
Is that what you thought I meant?
(who invented language, anyway?) ;)