View Full Version : force orphan into iframe on index.html

04-16-2005, 12:08 AM

I'm sure this has been asked a million times, but I can't find an example that I can make work.

Note: I am not familiar with variables and javascript so I need it explained as "cut & paste" as possible :)

I am trying to force my orphaned content pages to reload back into their iframe on my index.html page. EG if a search engine indexes a content page and some one clicks it in their results, it will then load and refresh itself into the main EXISTING frame in index.html

I have tried a bunch of more complex scripts than below as well. No success. Not sure what I am doing wrong. It needs to be as browser compatible as possible, IE, Netscape & Safari mainly.

I'd really appreciate your help!
Thanks in advance..


if (top == self) self.location.href = 'http://www.staticfarm.com/index.html' target='iframe';
// -->

04-16-2005, 01:21 AM
if (top == self) self.location.href ="http://www.staticfarm.com/index.html& target=iframe";
// -->

where 'target' is a variable in the index.html main window.

04-17-2005, 07:12 AM
Thats great.
thanks for your time.

I am prett lame at JS tho, (eh I have little or no idea at all).
Could you explain how I would do the variable on my parent iframe?

The 2 pages I am trying to link up like this are:
www.staticfarm.com/index.html (has the iframe)

Sorry for being thick. ;)