Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace function

Status
Not open for further replies.

CarloD

Technical User
Dec 6, 2001
2
0
0
CH
Hello i have this framechecker on my page.
Where must i input the "replace" function?
Because when the framechecker will work, the the visitor cannot return to the original page.

This is the code in the frameset:

<SCRIPT language=&quot;JavaScript&quot;>
<!--

function GS_frameinit() {
var st = window.location.href;
var mypos = st.indexOf(&quot;?&quot;);

if (mypos > 0) {
st=st.substr(st.indexOf('?')+1,st.length-st.indexOf('?')-1);
self.Hauptframe.location.href = st;
}


// if (self.location.hash != '') {
// var Path = self.Hauptframe.location.href.substring(0, self.Hauptframe.location.href.lastIndexOf('/'));
// var SubPage = self.location.hash.substring(1, self.location.hash.length);
// self.Hauptframe.location.href = Path + &quot;/&quot; + SubPage;
// }
}


//-->
</SCRIPT>

**********************************
And this is the code on every page:

<script language=&quot;JavaScript&quot;>
<!--

var thispagename = self.location.href.substring(self.location.href.lastIndexOf('/')+1,self.location.href.length);

if(!parent.Hauptframe)
{
window.location.href=&quot;index.htm?&quot;+thispagename;

}
//-->
</script>

Thanks a lot for the help

Bye
Carlo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top