InterlinkModule
Technical User
I'm using the built in DHTML cascading menu builder in the CoffeeCup 2007 HTML Editor. It seems to work fine, but the problem is this: I have a two frame page, as follows:
<frameset rows="10%,*" border="0">
<frame name="darkness" src="frame.html" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0" noresize>
<frame name="dissolution" src="dissolution.html" marginwidth="10" marginheight="10" scrolling="no" frameborder="0">
</frameset>
This is my index page. The Javascript menu is contained in frame.html and an intro/welcome page in dissolution. I want *any* link that is selected in the cascading menu in the top frame to open in the bottom frame, preserving the menu in case the user wants to navigate elsewhere on the site. I'm fairly new to Javascript and don't yet have the expertise, altho it reminds me a lot of my C++ days. I've found the area in the code that I think should be responsible for the frame locations but I'm not sure. Here is the part I believe it is:
if(FrstCreat){
if(FirstLineFrame =="" || !parent.frames[FirstLineFrame]){
FirstLineFrame=SecLineFrame;
if(FirstLineFrame =="" || !parent.frames[FirstLineFrame]){
FirstLineFrame=SecLineFrame;
if(FirstLineFrame =="" || !parent.frames[FirstLineFrame])FirstLineFrame=SecLineFrame=DocTargetFrame=''}}
if(SecLineFrame =="" || !parent.frames[SecLineFrame]){
SecLineFrame=DocTargetFrame;
if(SecLineFrame =="" || !parent.frames[SecLineFrame])SecLineFrame=DocTargetFrame=FirstLineFrame}
if(DocTargetFrame =="" || !parent.frames[DocTargetFrame])DocTargetFrame=SecLineFrame;
if(WebMasterCheck){ if(!Check('Menu',NoOffFirstLineMenus)){status='build aborted';return}}
FrstLoc=FirstLineFrame!=""?parent.frames[FirstLineFrame]:window;
ScLoc=SecLineFrame!=""?parent.frames[SecLineFrame]:window;
DcLoc=DocTargetFrame!=""?parent.frames[DocTargetFrame]:window;
if (FrstLoc==ScLoc) AcrssFrms=0;
if (AcrssFrms)FirstLineHorizontal=MenuFramesVertical?0:1;
FrstWinWdth=ExpYes?FrstLoc.document.body.clientWidth:FrstLoc.innerWidth;
FrstWinHght=ExpYes?FrstLoc.document.body.clientHeight:FrstLoc.innerHeight;
ScWinWdth=ExpYes?ScLoc.document.body.clientWidth:ScLoc.innerWidth;
ScWinHght=ExpYes?ScLoc.document.body.clientHeight:ScLoc.innerHeight;
if(Nav4){ CntrTxt=MenuTextCentered!='left'?"<div align='"+MenuTextCentered+"'>":"";
TxtClose="</font>"+MenuTextCentered!='left'?"</div>":""}}
The frame location should be related to the var DocTargetFrame according to the var defitions at the start of the script. So, how can I get links clicked on in the top frame menu to open in the bottom frame? I've examined several related scripts and can't figure it out as there are significant differences.
Also on the subject, is there a way to preserve the menu if someone starts hitting the back and forward buttons on the browser? I tested it briefly, and the menu just vanished on several occasions....
Thanks!
-=<>=-
<frameset rows="10%,*" border="0">
<frame name="darkness" src="frame.html" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0" noresize>
<frame name="dissolution" src="dissolution.html" marginwidth="10" marginheight="10" scrolling="no" frameborder="0">
</frameset>
This is my index page. The Javascript menu is contained in frame.html and an intro/welcome page in dissolution. I want *any* link that is selected in the cascading menu in the top frame to open in the bottom frame, preserving the menu in case the user wants to navigate elsewhere on the site. I'm fairly new to Javascript and don't yet have the expertise, altho it reminds me a lot of my C++ days. I've found the area in the code that I think should be responsible for the frame locations but I'm not sure. Here is the part I believe it is:
if(FrstCreat){
if(FirstLineFrame =="" || !parent.frames[FirstLineFrame]){
FirstLineFrame=SecLineFrame;
if(FirstLineFrame =="" || !parent.frames[FirstLineFrame]){
FirstLineFrame=SecLineFrame;
if(FirstLineFrame =="" || !parent.frames[FirstLineFrame])FirstLineFrame=SecLineFrame=DocTargetFrame=''}}
if(SecLineFrame =="" || !parent.frames[SecLineFrame]){
SecLineFrame=DocTargetFrame;
if(SecLineFrame =="" || !parent.frames[SecLineFrame])SecLineFrame=DocTargetFrame=FirstLineFrame}
if(DocTargetFrame =="" || !parent.frames[DocTargetFrame])DocTargetFrame=SecLineFrame;
if(WebMasterCheck){ if(!Check('Menu',NoOffFirstLineMenus)){status='build aborted';return}}
FrstLoc=FirstLineFrame!=""?parent.frames[FirstLineFrame]:window;
ScLoc=SecLineFrame!=""?parent.frames[SecLineFrame]:window;
DcLoc=DocTargetFrame!=""?parent.frames[DocTargetFrame]:window;
if (FrstLoc==ScLoc) AcrssFrms=0;
if (AcrssFrms)FirstLineHorizontal=MenuFramesVertical?0:1;
FrstWinWdth=ExpYes?FrstLoc.document.body.clientWidth:FrstLoc.innerWidth;
FrstWinHght=ExpYes?FrstLoc.document.body.clientHeight:FrstLoc.innerHeight;
ScWinWdth=ExpYes?ScLoc.document.body.clientWidth:ScLoc.innerWidth;
ScWinHght=ExpYes?ScLoc.document.body.clientHeight:ScLoc.innerHeight;
if(Nav4){ CntrTxt=MenuTextCentered!='left'?"<div align='"+MenuTextCentered+"'>":"";
TxtClose="</font>"+MenuTextCentered!='left'?"</div>":""}}
The frame location should be related to the var DocTargetFrame according to the var defitions at the start of the script. So, how can I get links clicked on in the top frame menu to open in the bottom frame? I've examined several related scripts and can't figure it out as there are significant differences.
Also on the subject, is there a way to preserve the menu if someone starts hitting the back and forward buttons on the browser? I tested it briefly, and the menu just vanished on several occasions....
Thanks!
-=<>=-