Link to a framed page on another site

liunx

Guest
I hate frames... and hardly ever use them, so don't know that much about them despite having coded for almost 7 years now.<br />
<br />
I have to redirect users that match certain criteria in an ASP page to a page (contents.asp) on another site that normally appears in a frameset.<br />
<br />
When I link to it, however, the page looks pretty wierd without the stuff that usually appears with the page. There are three frames in use- logo at the top (logo.html) and the nav bar at the left (nav.htm), and the contents of the various pages in the right frame.<br />
<br />
I have reviewed and tested about 30 examples of links to frames pages, and none have helped. <br />
<br />
Any suggestions would be most appreciated.<br />
<br />
Thanks in advance!<!--content-->Perhaps you could copy the frameset code from the other site, place it into an HTML file on your system, then put the full URL's to the top/nav/content pages in there and link to that instead. That would get the correct top/side and put the correct file into the content area. This may or may not work depending on how their links are setup in the menu, etc.<!--content-->The page that starts a frame site with all the frames in it, like any other page without frames, usually has a name like index or main. Try including that page in the address.<!--content-->Originally posted by jdavia <br />
The page that starts a frame site with all the frames in it, like any other page without frames, usually has a name like index or main. Try including that page in the address. <br />
<br />
It is index.htm. I have researched and can not find any working examples of how to include the various pages into one link, i.e. <!-- w --><a class="postlink" href="http://www.whatever.com/index.htm#contents.asp">www.whatever.com/index.htm#contents.asp</a><!-- w -->. The closest I have found is one example in another post in the General forum, but it doesn't work, even when I change the "top" to parent as suggested might be necessary:<br />
<br />
Originally posted by AdamGundry <br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:void(top.navigation.left.location ='blank.html');void(top.navigation.right.location = 'page1.html');">Go to page1</a> <br />
<br />
This would show a hyperlink that, when clicked, displayed "blank.html" in the left frame and "page1.html" in the right frame. You might have to experiment with "top.navigation", as it might be "parent.navigation" or similar, I'm not sure. <br />
<br />
I get "Error on the page" when I try the example.<br />
<br />
Many thanks to all who have tried to help, and many more thanks to anyone who has any other suggestions!<br />
<br />
CR<!--content-->You might be able to do something like this:<br />
<br />
...<br />
<script language="JavaScript" type="text/JavaScript"><br />
<br />
function certainFrame(page) {<br />
parent.frameName.location.replace(page);<br />
}<br />
window.setTimeOut("certainFrame(page)", 100);<br />
<br />
</script><br />
...<br />
<body onLoad="certainFrame('newpage.html');"><br />
...<br />
<br />
This, (if it works!), would redirect one of the frames in the page to a new page. The reason I used the setTimeOut method, is so I can wait till the frame pages are Download <!--more-->ed and not just the actual page that contains the frames.<!--content-->Play around with this.<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.THE SITE ADDRESS/index.html" target="contents.asp">Contents</a><br />
<br />
It should open the contents page inside the index page window as a single frame.<!--content-->Originally posted by CRagsdell <br />
how to include the various pages into one link, i.e. <!-- w --><a class="postlink" href="http://www.whatever.com/index.htm#contents.asp">www.whatever.com/index.htm#contents.asp</a><!-- w -->. <br />
<br />
Create your own copy of the original frameset, into which you load the different pages, including the page searched for.<br />
<br />
Since you have serverside scripting to work with, this is both easy and 100% reliable.<br />
Relying on clientside scripting is just foolish in this case since it might easily break.<!--content-->
 
Back
Top