Problem with frames...

I want to open two web pages in a single window ,so i am using frames . now it opens fine for some pages but for few it opens in whole window and i am losing frames .can anyone plz explain why and how to open web page in particular frame only. Just see this one side i have yahoo and other google now even if i navigate through google its on right side i will not lose my frames but just click any link in yahoo frames r lost...

<HTML>

<HEAD>

<TITLE>MyFramesPage</TITLE>

<SCRIPT LANGUAGE="JavaScript">

<!--

defaultsubpage="http://www.google.co.in";//right side page

if (location.search) {subpage=location.search.substring(1)}

else {subpage=defaultsubpage}

if (subpage.indexOf('&&&')>=0) {

prefix=subpage.substring(0,subpage.indexOf('&&&'))+"://";

suffix=subpage.substring(subpage.indexOf('&&&')+3,subpage.length);

subpage=prefix+suffix;

}

// -->

</SCRIPT>

</HEAD>

<SCRIPT>

document.write('<FRAMESET COLS="50%,50%">');

document.write('<FRAME SRC="http://www.yahoo.com" NAME="nav">');//left side page

document.write('<FRAME SRC="'+subpage+'" NAME="main">');

document.write('</FRAMESET>');

</SCRIPT>

</HTML>

Message was edited by:

uk0102

[1437 byte] By [uk0102a] at [2007-11-26 15:35:21]
# 1
It is because some sites don't like you stealing their content and use some HTML/Javascript to detect and break up frames if you try to include them in one.
CeciNEstPasUnProgrammeura at 2007-7-8 21:52:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
so there is no way to open any yahoo releated sites?
uk0102a at 2007-7-8 21:52:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
anyone help ............Message was edited by: uk0102
uk0102a at 2007-7-8 21:52:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...