[Javascript] Re: loading on frame

Vee Jay veejay_kavi at hotmail.com
Sat Oct 13 00:41:33 CDT 2001


Thx Ben for the feedback..but the second part is not working.

<script>
if (self.name != "main" || self == parent)
    top.location.href = "../index.html?main=" + self.location.href;
</script>

The above script as you said is placed in  my single pages (instead of my 
previous script)...and is working fine. Below is how I have placed....

<frameset framespacing="0" border="false" frameborder="0" rows="80,*">
<frame name="banner" scrolling="no" noresize target="contents" 
src="indianmsian_top.htm">
<frameset cols="150,*">
<frame name="contents" target="main" src="indianmsian_content.htm" 
scrolling="no">
<frame name="main" src="indianmsian_main.htm" scrolling="auto">
</frameset>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
<script>
if (self.location.search.indexOf('?main=') == 0)
self.main.location.href = self.location.search.substring(6);
</script>

Now...when the single page is addressed, it refers to my index, but the 
index.html doesnt load the single page on the "main" frame, althogh at the 
address url of the browser I do see it
http://abc/index.html?main=http://abc/doctor.htm

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




More information about the Javascript mailing list