I have the following HTML page (see bottom of message) that consists of a
frame with two windows. The top window is always the menu, and the bottom
window is by default a document named "TheDesc.ht m". However, if another
page is called, I want to display this new page into the bottom frame in
place of "TheDesc.ht m".
My problem is with the third document.write command in the SCRIPT section.
document.write( '<FRAME SRC="+%20(%20lo cation.search%2 0?
location.search .substring(1):" TheDesc.htm") + NAME="MAIN">');
I get an error message when calling another page, like:
Any idea what is wrong with this line?
BTW, I got this script from a web site, so I'm not sure I fully understand
this like. What %20 means.
Richard
<HTML>
<HEAD>
<SCRIPT language="JavaS cript">
document.write( '<FRAMESET FRAMEBORDER="0" BORDER="0" FRAMESPACING="0 "
ROWS="121,85%"> ');
document.write( '<FRAME SRC="TheMenu.ht m" NAME="MENU" MARGINWIDTH="0"
MARGINHEIGHT="0 ">');
document.write( '<FRAME SRC="+%20(%20lo cation.search%2 0?
location.search .substring(1):" TheDesc.htm") + NAME="MAIN">');
document.write( '<\/FRAMESET>');
</SCRIPT>
</HEAD>
<FRAMESET FRAMEBORDER="0" BORDER="0" FRAMESPACING="0 " ROWS="125,84%">
<FRAME SRC="TheMenu.ht m" NAME="MENU" MARGINWIDTH="0" MARGINHEIGHT="0 ">
<FRAME SRC="TheDesc.ht m" NAME="MAIN" MARGINWIDTH="8" >
<NOFRAMES>
<BODY>
Viewing this page requires a browser capable of displaying frames.
</BODY>
</NOFRAMES>
</FRAMESET>
</HTML>
frame with two windows. The top window is always the menu, and the bottom
window is by default a document named "TheDesc.ht m". However, if another
page is called, I want to display this new page into the bottom frame in
place of "TheDesc.ht m".
My problem is with the third document.write command in the SCRIPT section.
document.write( '<FRAME SRC="+%20(%20lo cation.search%2 0?
location.search .substring(1):" TheDesc.htm") + NAME="MAIN">');
I get an error message when calling another page, like:
Any idea what is wrong with this line?
BTW, I got this script from a web site, so I'm not sure I fully understand
this like. What %20 means.
Richard
<HTML>
<HEAD>
<SCRIPT language="JavaS cript">
document.write( '<FRAMESET FRAMEBORDER="0" BORDER="0" FRAMESPACING="0 "
ROWS="121,85%"> ');
document.write( '<FRAME SRC="TheMenu.ht m" NAME="MENU" MARGINWIDTH="0"
MARGINHEIGHT="0 ">');
document.write( '<FRAME SRC="+%20(%20lo cation.search%2 0?
location.search .substring(1):" TheDesc.htm") + NAME="MAIN">');
document.write( '<\/FRAMESET>');
</SCRIPT>
</HEAD>
<FRAMESET FRAMEBORDER="0" BORDER="0" FRAMESPACING="0 " ROWS="125,84%">
<FRAME SRC="TheMenu.ht m" NAME="MENU" MARGINWIDTH="0" MARGINHEIGHT="0 ">
<FRAME SRC="TheDesc.ht m" NAME="MAIN" MARGINWIDTH="8" >
<NOFRAMES>
<BODY>
Viewing this page requires a browser capable of displaying frames.
</BODY>
</NOFRAMES>
</FRAMESET>
</HTML>
Comment