Forum Moderators: open

Message Too Old, No Replies

Linking to specific framed content

linking & linked content on same domain

         

ga_ga

9:19 am on Jun 22, 2003 (gmt 0)

10+ Year Member



I'm working on a site which has been built by another designer using frames and php. The basic structure is an index page composed of a horizontal top 'logo banner' frame, with the space below occupied by a lefthand navigation frame, and a righthand content frame. There are 4 links in the plain html document which occupies the lefthand navigation frame; sales, help, about, and contact.
These links target the righthand 'main' frame, and change the php generated content within it.

I'm attempting to provide a decent index page, written in straightforward, frameless html, so that Google and other search engines might index the site better. Currently, various pages from the existing site *are* listed, but for keyphrases which are completely irrelevant to the true nature of the site. Customer & myself have agreed that it's best to leave the existing pages untouched bar a few minor filename changes, and maybe the inclusion of meta noindex tags to prevent the current crop of spurious listings, as the site as a whole is composed of fairly complex, non-commented server-side scripting.

I'm trying to provide a 4-button top-of-page navbar on this new front page, in order to provide direct links to specific frameset incarnations of the existing site.

In other words, the 'sales' link should bring up the existing framed site, with the 'sales' content ready-loaded in the content frame, & so on.

I've managed to accomplish this by using javascript, but it's a bit messy. I've done it by spawning a new browser, loading the original frame page, then causing a click on the relevant link in it's lefthand navbar, before closing my new, SEO'd if you will, page.

function help(){
helppage=window.open("framepage.html","Help","");
helppage.focus();
helppage.navigation.document.links[2].click();
self.close();
}

Of course this is messy to the viewer, with windows opening & closing all over the place, also, I'm concerned about viewers with js turned off etc. Not too bothered about some search engines not being able to traverse the js links, as the existing content in the existing site whilst being relevant & nice looking, gives rise to completely inaccurate listings, and unfortunately needs to be left alone as much as possible. The only page I'm hoping to be listed by the se's would be the new front page.

Feel like I might be barking up completely the wrong tree trying to do things this way, but I have gone completely blank and would welcome ideas, comments.. Thanks..

tedster

10:02 pm on Jun 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think I've got a simpler approach for your links. Check out message #21 on our Generic Javascript thread [webmasterworld.com].

Using that approach you would create one "template" frameset that catches any specific "framed" page that is loaded directly. So your links can go right to any content page and the script would put it into the frameset.

Setting up your framed pages this way also serves visitors who come from search engines by framing the content page that the search engine sent them to -- and no extra windows need to open or close.

[edited by: tedster at 7:56 am (utc) on June 23, 2003]

ga_ga

7:21 am on Jun 23, 2003 (gmt 0)

10+ Year Member



Great idea, thanks Tedster, appreciate your reply.. just tried it, works a dream :-) I'm made up.

I'm just using it as 4 hard-coded document.write() functions in the head of the new front page, each one fired up by it's respective link on the navbar. Having looked, stats package is suggesting that < 1% of the existing visitors to this site have no js, but I've included a plain link to the old site for those folks.

Another thing.. doing it this way, I'm not disabling the 'back' button which is excellent!

Many thanks.