retrositelover
Programmer
- Oct 20, 2004
- 35
Hi,
on my homepage, I use a little javascript to load pages in a frameset if on top. there are two problems: the back-button needs to be clicked more than one time if the visitors want to leave, and named anchors don't work, so the page loads in the frame, but doesn't jump to the texts automatically
the frameset...
and in the page that has to load in frames...
demo
thanks in advance for any hint + kind regards
Joerg
on my homepage, I use a little javascript to load pages in a frameset if on top. there are two problems: the back-button needs to be clicked more than one time if the visitors want to leave, and named anchors don't work, so the page loads in the frame, but doesn't jump to the texts automatically
the frameset...
Code:
startURL=parent.document.URL
internalURL=startURL.substring(startURL.indexOf('?')+1,startURL.length)
document.write('<FRAMESET COLS="38%,62%" FRAMESPACING="1" FRAMEBORDER="0" BORDER="1" BORDERCOLOR="white"><FRAME NAME="left0" ID="left0" SRC="navigation.html"><FRAME NAME="right0" ID="right0" SRC=" ' + internalURL + ' "><NOFRAMES><<A HREF="navigation.html">sitemap<\/A>><\/NOFRAMES><\/FRAMESET>')
and in the page that has to load in frames...
Code:
internalpage=document.URL
if(top.location==self.location)top.location.href="frameset.html?"+internalpage
demo
thanks in advance for any hint + kind regards
Joerg