Forum Moderators: open
In this site I am using this zero-height frame technique to routines like drop-down-menu updating without having to refresh the main frame. But now it hit me that maybe when I air up the site, search engines may present the links to the internal pages, and so my hidden frame wonīt be present!
I thought maybe having javascript to check if the zero-height frame is present, everytime that I may need it. If it isn't, having javascript to shift the content of the frameless window into a B frame, having A as a zero-height frame...
You guys know if this is possible?
In fact, I could have this pivot-role made by a pop-up window. But the point is that the frame technique is good to hide the parameters we pass through the non-hidden frame, while the browser's adress bar shows up only our siteīs domain, you know...
I wait for your help then,
Thanks a lot
phoenix_fly
In the pages to be framed, add this piece of script:
if (top.frames.length==0) {
document.location= "index.html?thispage.html";
}
In index.html (presuming that's the file that contains your frameset), have javascript write the frameset:
var d = document;
if (self.parent.frames.length!= 0)
self.parent.location = d.location;
a = d.location.href;
b = a.indexOf('?');
if (b == -1) frUrl = 'home.html'; // default content page
else frUrl = a.substring(b+1, a.length);
d.writeln('<frameset rows="0,*">');
d.writeln(' <frame src="top.html" name="topframe">');
d.writeln(' <frame src="', frUrl ,'" name="mainframe">');
d.writeln('</frameset>');
Thanks for the reply.
My situation is a little bit more tricky: I almost donīt have html pages, as this site is heavily dinamic. So the current non-frame page (wich I have to make a frame page) can be any script.cgi with many parameters sent (through GET only, though! Thank god.)
Is there a way to implement this using the code you sent me? Or it already does that? Sorry Iīm not deeply familiar with these properties you used.
Thanks a lot
phoenix_fly