?
Solved

Java Menu - ryHyperAM.class

Posted on 1998-08-24
3
Medium Priority
?
281 Views
Last Modified: 2013-12-25
I have a new website going up in three weeks time, on the site I'm going to have a frame system with a java menu used for navigation. My problem when I select a page from the java menu it is opened in the same frame, when I really want the selected page to open in the opposite frame, on the right. The Applett is called ryHyperAM.class and the new frame system I'm trying to use is at http://ww.ph1.com/test 

I know it's _self for the same window and _new for new browser...  any ideas?
0
Comment
Question by:wooble
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Accepted Solution

by:
MasseyM earned 200 total points
ID: 1854543
A Java applet must have the "target" capability built in at design time... You cannot pass it random variables... So, unless this is a built in capability the best thing to do is to 1) not use frames, or 2) not use Java...


0
 
LVL 2

Expert Comment

by:englishman
ID: 1854544
I use this:
Main frame page in the root (index.htm):


<script language="JavaScript">

<!--
function divObject(obj) {
        this.style = obj;
        this.document = obj.document;
}
function simpleArray() {
        this.item = 0;
}
function imgStoreItem(theName, theSrc, w, h) {
        this.name = theName;
        this.src = theSrc;
        this.obj = null;
        this.w = w;
        this.h = h;
        if (theBrowser.canCache) {
                this.obj = new Image(18, 16);
                this.obj.src = theSrc;
        }
}
function imgStoreObject() {
        this.count = -1;
        this.img = new imgStoreItem;
        this.find = imgStoreFind;
        this.add = imgStoreAdd;
        this.getSrc = imgStoreGetSrc;
        this.getTag = imgStoreGetTag;
}
function imgStoreFind(theName) {
        var foundItem = -1;
        for (var i = 0; i <= this.count; i++) {
                if (this.img[i].name == theName) {
                        foundItem = i;
                        break;
                }
        }
        return foundItem;
}
function imgStoreAdd(theName, theSrc, w, h) {
        if (theSrc) {
        var i = this.find(theName);
        if (i == -1) {
                this.img[++this.count] = new imgStoreItem(theName, theSrc, w, h);
        } else {
                this.img[i].name = theName;
                this.img[i].src = theSrc;
                this.img[i].w = w;
                this.img[i].h = h;
        }
        }
}
function imgStoreGetSrc(theName) {
        var i = this.find(theName);
        return (i == -1) ? '' : this.img[i].src;
}
function imgStoreGetTag(theName, iconID) {
        var i = this.find(theName);
        var Found = '';
        if (i >= 0) {
                with (this.img[i]) {
                        if (src != '') {
                                Found = '<img src=' + '"' + src +  '" width=' + w + ' height=' + h + ' border=0 align="top"';
                                if (iconID != '') {
                                        Found += ' name="' + iconID + '" ';
                                }
                        }
                }
                Found += '>';
        }
        return Found;
}
// The MenuItem object.  This contains the data and functions for drawing each item.
function MenuItem (id, type, text, url, status, item, parent) {
        this.id = id;
        this.type = type;
        this.text = text;
        this.url = url;
        this.status = status;
        this.target = "text";
        this.onClickFunc = "";
        this.nextItem = item;
        this.FirstChild = -1;
        this.parent = parent;
        this.isopen = false;
        this.isSelected = false;
        this.divObj = null;
        this.spanObj = null;
        this.draw = DrawItem;
        this.PMIconName = getPMIconName;
        this.setImg = setImage;
        this.setIsOpen = SetIsOpen;
        this.setSelected = SetSelected;
        this.mouseOver = mouseOver;
        this.mouseOut = mouseOut;
}
function DrawItem (indentStr) {
        var tmp = '="return parent.theMenu.entry[' + this.id + '].';
        var iconTag = imgStore.getTag(this.PMIconName(), 'plusMinusIcon' + this.id);
        var aLine = '<nobr>' + indentStr;
        if (this.FirstChild != -1) {
                aLine += '<A HREF="javascript:parent.theMenu.toggle(' + this.id + ')" name="plusMinus' + this.id + '" ';
                aLine += 'onMouseOver' + tmp + 'mouseOver(\'plusMinusIcon\');" ';
                aLine += 'onMouseOut' + tmp + 'mouseOut(\'plusMinusIcon\');">' + iconTag + '</A>';
        } else {
                aLine += iconTag;
        }
        var imgName = this.type + ((this.isSelected) ? 'Selected' : '');
        if (imgStore.getSrc(imgName) == '') {imgName = this.type;}
        var theEntry = imgStore.getTag(imgName, 'docIcon' + this.id) + this.text;
        aLine += '<SPAN CLASS="' + ((this.FirstChild != -1) ? 'node' : 'leaf') + '">'
        if ((this.url != '') || (theMenu.wizardInstalled)) {
                aLine += '<A HREF="';
                aLine += (theMenu.wizardInstalled) ? 'javascript:void(0)"' : (this.url + '" TARGET="' + this.target +'" ');
                aLine += 'onClick="parent.theMenu.itemClicked(' + this.id + ');';
                aLine += (this.onClickFunc != '') ? 'parent.' + this.onClickFunc + ';" ' : '" ';
                aLine += 'onMouseOver' + tmp + 'mouseOver(\'docIcon\');" ';
                aLine += 'onMouseOut' + tmp + 'mouseOut(\'docIcon\');">' + theEntry + '</A>';
        } else {
                aLine += theEntry;
        }
        aLine += '</SPAN></nobr><BR>';
        return aLine
}
function getPMIconName() {
        var iconName = 'icon' + ((this.FirstChild != -1) ? ((this.isopen == true) ? 'Minus' : 'Plus') : 'Join');
        iconName += (this.id == 0) ? ((this.nextItem == -1) ? 'Only' : 'Top') : ((this.nextItem == -1) ? 'Bottom' : '');
        return iconName;
}
function setImage(imgID, imgName) {
        var imgSrc = imgStore.getSrc(imgName);
        if (imgSrc != '') {
                if (theBrowser.hasDHTML) {
                        if (this.divObj) { this.divObj.document.images[imgID].src = imgSrc; }
                } else {
                        if (theBrowser.canCache) {
                                if(self.menu) {
                                        if (self.menu.document.images[imgID]) {self.menu.document.images[imgID].src = imgSrc;}
                                }
                        }
                }
        }
}
function SetIsOpen (isOpen) {
        if (this.isopen != isOpen) {
                this.isopen = isOpen;
                this.setImg('plusMinusIcon' + this.id, this.PMIconName());
                return true;
        } else { return false; }
}
function SetSelected (isSelected) {
        this.isSelected = isSelected;
        this.setImg('docIcon' + this.id, this.type + ((isSelected) ? 'Selected' : ''));
}
function mouseOver(imgName) {
        self.menu.status = '';  //Needed for setStatus to work on MSIE 3 - Go figure!?
        var newImg = '';
        if (imgName == 'plusMinusIcon') {
                newImg = this.PMIconName();
                setStatus('Click to ' + ((this.isopen == true) ? 'collapse.' : 'expand.'));
        } else {
                if (imgName == 'docIcon') {
                        newImg = this.type + ((this.isSelected) ? 'Selected' : '');
                        setStatus(this.status);
                }
        }
        if (theBrowser.canOnMouseOut) { this.setImg(imgName + this.id, newImg + 'MouseOver'); }
        return true;
}
function mouseOut(imgName) {
        clearStatus();
        var newImg = '';
        if (imgName == 'plusMinusIcon') {
                newImg = this.PMIconName();
        } else {
                if (imgName == 'docIcon') {
                var imgSrc = imgStore.getSrc(imgName);
                        newImg = this.type + ((this.isSelected) ? 'Selected' : '');
                        if (imgStore.getSrc(newImg) == '') { newImg = this.type; }
                }
        }
        if (theBrowser.canOnMouseOut) { this.setImg(imgName + this.id, newImg); }
        return true;
}
// The Menu object.  This is basically an array object although the data in it is a tree.
function Menu () {
        this.count = -1;
        this.autoScrolling = false;
        this.modalFolders = false;
        this.linkOnExpand = false;
        this.toggleOnLink = false;
        this.lastPMClicked = -1;
        this.selectedEntry = -1;
        this.menuTop = 40;
        this.entryHeight = 16;
        this.wizardInstalled = false;
        this.entry = new MenuItem;
        this.addMenu = AddMenu;
        this.addChild = AddChild;
        this.draw = MenuDraw;
        this.drawALevel = DrawALevel;
        this.refresh = refreshMenu;
        this.reload = reloadMenu;
        this.refreshDHTML = refreshMenuDHTML;
        this.itemClicked = itemClicked;
        this.setEntry = setEntry;
        this.setEntryByURL = setEntryByURL;
        this.setAll = setAll;
        this.openAll = openAll;
        this.closeAll = closeAll;
        this.findEntry = findEntry;
        this.toggle = toggle;
}
function AddMenu (addTo, type, text, url, status) {
        var theNI = -1;
        var theP = -1;
        if ((url == '') && (theBrowser.canJSVoid)) {url = 'javascript:void(0);';}
        if (addTo == -1) { addTo = this.count; }
       
        if (this.count++ != -1) {
                theNI = this.entry[addTo].nextItem;
                theP = this.entry[addTo].parent;
                this.entry[addTo].nextItem = this.count;
        }
        this.entry[this.count] = new MenuItem(this.count, type, text, url, status, theNI, theP);
        return this.count;
}
function AddChild (addTo, type, text, url, status) {
        if ((url == '') && (theBrowser.canJSVoid)) {url = 'javascript:void(0);';}
        if (this.count == -1) {
                this.addMenu (addTo, type, text, url, status);
        } else {
                if (addTo < 0) { addTo = this.count; }
                var childID = this.entry[addTo].FirstChild;
                if (childID < 0) {
                        this.count++;
                        this.entry[this.count] = new MenuItem(this.count, type, text, url, status, -1, addTo);  
                        this.entry[addTo].FirstChild = this.count;
                } else {
                        while (this.entry[childID].nextItem != -1) {
                                childID = this.entry[childID].nextItem;
                        }
                        this.addMenu (childID, type, text, url, status)
                }
        }
        return this.count;
}
function MenuDraw() {
        this.drawALevel(0, '', true);
        if (theBrowser.hasDHTML) {
                this.refreshDHTML();
        } else {
                if ((this.lastPMClicked > 0) && theBrowser.mustMoveAfterLoad) {
                        self.menu.location = self.menu.location.pathname + '#plusMinus' + this.lastPMClicked;
                        this.lastPMClicked = 0;
                }
        }
}
function DrawALevel(firstItem, indentStr, isVisible) {
        var currEntry = firstItem;
        var tempStr = "";
        var aLine = "";
        var e = null;
        while (currEntry > -1) {
                e = this.entry[currEntry];
                aLine = e.draw(indentStr);
                if (theBrowser.hasDHTML) {
                        var menuBottom = (this.count * this.entryHeight) + this.menuTop;
                        var divName = 'entryDIV' + currEntry
                        var spanName = 'entrySPAN' + currEntry
                        aLine = '<DIV ID="' + divName + '" CLASS="menuItem">' + aLine + '</DIV>';
                        self.menu.document.writeln (aLine);
                        if (theBrowser.code == "MSIE") {
                                e.divObj = self.menu.document.all[divName];
                        } else {
                                e.divObj = new divObject(self.menu.document[divName]);
                        }
                        e.divObj.style.top = menuBottom
                } else {
                        self.menu.document.writeln (aLine);
                }
                if (e.FirstChild > -1) {
                        if ((theBrowser.hasDHTML) || (e.isopen && isVisible)) {
                                tempStr = (e.nextItem == -1) ? 'iconBlank' : 'iconLine';
                                this.drawALevel(e.FirstChild, indentStr + imgStore.getTag(tempStr, ''), (e.isopen && isVisible));
                        }
                }
                currEntry = e.nextItem;
        }
}
function refreshMenu(positionMenu) {
        if (theBrowser.hasDHTML) {
                this.refreshDHTML(positionMenu);
        } else {
                this.reload(positionMenu);
        }
}
function reloadMenu(positionMenu) {
        if (theBrowser.hasDHTML) {
                self.menu.location.reload();
        } else {
                var newLocation = self.menu.location.pathname;
                if (positionMenu) {
                        if (theBrowser.mustMoveAfterLoad == false) {
                                newLocation += "#plusMinus" + this.lastPMClicked;
                                this.lastPMClicked = 0;
                        }
                } else {
                        this.lastPMClicked = 0;
                }
                if (theBrowser.hasRentrantBug) {
                        setTimeout("self.menu.replace('" + newLocation + "');", 200);
                } else {
                        self.menu.replace(newLocation);
                }
        }
}
function refreshMenuDHTML(positionMenu) {
        var nextItemArray = new simpleArray
        var level = 1;
        var currEntry = 0;
        var isVisible = true;
        var lastVisibleLevel = 1;
        var yPos = this.menuTop;
        var e = null;
        var s = null;
        while (level > 0) {
                e = this.entry[currEntry];
                s = e.divObj.style
                if (isVisible) {
                        s.top = yPos;
                        s.visibility = 'visible';
                        yPos += theMenu.entryHeight;
                        lastVisibleLevel = level;
                } else {
                        s.visibility = 'hidden';
                }
                if (e.FirstChild > -1) {
                        isVisible = (e.isopen == true) && isVisible;
                        nextItemArray[level++] = e.nextItem;
                        currEntry = e.FirstChild;
                } else {
                        if (e.nextItem != -1) {
                                currEntry = e.nextItem;
                        } else {
                                while (level > 0) {
                                        if (nextItemArray[--level] != -1) {
                                                currEntry = nextItemArray[level];
                                                isVisible = (lastVisibleLevel >= level);
                                                break;
                                        }
                                }
                        }
                }
        }
        var pmc = this.lastPMClicked
        if (pmc >= 0) {
                e = this.entry[pmc];
                var srTop = e.divObj.style.top
                var srBot = (e.nextItem > 0) ? this.entry[e.nextItem].divObj.style.top : yPos;
                var curTop = self.menu.pageYOffset;
                var curBot = curTop + self.menu.innerHeight;
                if ((srBot > curBot) || (srTop < curTop)) {
                        var scrBy = srBot - curBot;
                        if (srTop < (curTop + scrBy)) { scrBy = srTop - curTop; }
                        self.menu.scrollBy(0, scrBy);
                }
        }
}
function itemClicked(entryNo) {
        var e = this.entry[entryNo]
        if ((e.url != '') && (e.url != 'javascript:void(0);')) {
                if (this.selectedEntry >= 0) {this.entry[this.selectedEntry].setSelected(false);}
                this.selectedEntry = entryNo;
                if (entryNo >= 0) {e.setSelected(true);}
        }
        if (this.wizardInstalled) {
                self.text.menuItemClicked(entryNo);
        }
        if (this.toggleOnLink) {this.toggle(entryNo);}
}
function setEntry(entryNo, state) {
        var mc = false;
        var cl = ',' + entryNo + ',';
        var e = this.entry[entryNo];
        this.lastPMClicked = entryNo
        mc = e.setIsOpen(state) || mc;
        var p = e.parent;
        while (p >= 0) {
                cl += p + ',';
                e = this.entry[p];
                mc = (e.setIsOpen(true)) || mc;
                p = e.parent;
        }
        if (this.modalFolders) {
                for (var i = 0; i <= this.count; i++) {
                        if (cl.indexOf(',' + i + ',') < 0) {
                                mc = this.entry[i].setIsOpen(false) || mc;
                        }
                }
        }
        return mc;
}
function setEntryByURL(theURL, state) {
        var i = this.findEntry(theURL);
        if (i != -1) {
                if (this.entry[i].parent != -1) {return this.setEntry(this.entry[i].parent, state);}
        }
}
function setAll(state) {
        var hasChanged = false;
        with (parent.theMenu) {
                for (var i = 0; i <= count; i++) {
                        hasChanged = entry[i].setIsOpen(state) || hasChanged;
                }
                if (hasChanged) { refresh(false); }
        }
}
function openAll() { setAll(true); }
function closeAll() { setAll(false); }

function findEntry(theURL) {
        var res = -1
        for (var i = 0; i <= this.count; i++) {
                if (this.entry[i].url == theURL) {
                        res = i;
                        break;
                }
        }
        return res;
}

function toggle(entryNo) {
        var e = this.entry[entryNo]
        var chg = this.setEntry(entryNo, e.isopen ^ 1);
        if (this.linkOnExpand && e.isopen && (e.url != '')) {
                if (myOpener != null) {
                        myOpener.text.location = e.url;
                } else {
                        self.text.location = e.url;
                }
                this.itemClicked(entryNo);
        }
        if (chg) {this.refresh(this.autoScrolling && (this.lastPMClicked > 0));}
}
// Other functions
function browserInfo() {
        this.code = 'unknown';
        this.version = 0;
        this.platform = 'Win';
       
        var i = navigator.userAgent.indexOf('MSIE');
        if (i >= 0) {
                this.code = 'MSIE';
                this.version = parseFloat(navigator.userAgent.substring(i+5, i+9));
        } else {
                i = navigator.userAgent.indexOf('Mozilla/')
                if (i >= 0) {
                        this.code = 'NS';
                        this.version = parseFloat(navigator.userAgent.substring(i+8, i+12));
                }
        }
        if (navigator.userAgent.indexOf('Mac') >= 0) {this.platform = 'Mac';}
        if (navigator.userAgent.indexOf('OS/2') >= 0) {this.platform = 'OS/2';}
        if (navigator.userAgent.indexOf('X11') >= 0) {this.platform = 'UNIX';}
       
        this.canCache = ((this.code == 'NS') && (this.version >= 3)) || ((this.code == 'MSIE') && (this.version >= 4)) ;
        this.canOnMouseOut = ((this.code == 'NS') && (this.version >= 3));
        this.hasRentrantBug = ((this.code == 'NS') && (this.version == 2.01) && (this.platform != 'Win'));
        this.canJSVoid = !(((this.code == 'NS') && (this.version < 3)) || ((this.code == 'MSIE') && (this.version < 4)));
        this.mustMoveAfterLoad = ((this.code == 'NS') && (this.version >= 3));
        this.hasDHTML = ((this.code == 'NS') && (this.version >= 4)) || ((this.code == 'MSIE') && (this.version >= 4));
}
function setStatus(theText) {
        var theWindow = window;
        if (getMode() == 'Floating') {theWindow = myOpener;}
        theWindow.status = theText;
        if (theBrowser.canOnMouseOut == false) {
                clearTimeout(statusTimeout);
                statusTimeout = setTimeout('clearStatus()', 5000);}
        return true;
}
function clearStatus() {
        var theWindow = window;
        if (getMode() == 'Floating') {theWindow = myOpener;}
        if (theWindow != null) {theWindow.status = '';}
}
function unloadFloating() {
        if (myOpener != null) {
                if (theBrowser.code == 'MSIE') {
                        myOpener.setTimeout('menuClosed();', 10);
                } else {
                        myOpener.menuClosed();
                }
        }
}
function getMode() {
        var cookieText = document.cookie;
        var theResult = "Frames";
        if (cookieText.length > 0) {
                if (cookieText.indexOf("mode=Floating") >= 0) {
                        theResult = "Floating";
                } else {
                        if (cookieText.indexOf("mode=NoFrames") >= 0) {
                                theResult = "NoFrames";
                        }
                }
        }
        return theResult;
}
function initOutlineIcons() {
        var ip = 'images/menu/';
        ip += (theBrowser.platform == 'Mac') ? 'mac/' : ((theBrowser.platform == 'OS/2') ? 'os2/' : 'win/')
       
        imgStore.add('iconPlusTop', ip + 'plustop.gif', 18, 16);
        imgStore.add('iconPlus', ip + 'plus.gif', 18, 16);
        imgStore.add('iconPlusBottom', ip + 'plusbottom.gif', 18, 16);
        imgStore.add('iconPlusOnly', ip + 'plusonly.gif', 18, 16);
        imgStore.add('iconMinusTop', ip + 'minustop.gif', 18, 16);
        imgStore.add('iconMinus', ip + 'minus.gif', 18, 16);
        imgStore.add('iconMinusBottom', ip + 'minusbottom.gif', 18, 16);
        imgStore.add('iconMinusOnly', ip + 'minusonly.gif', 18, 16);
        imgStore.add('iconLine', ip + 'line.gif', 18, 16);
        imgStore.add('iconBlank', ip + 'blank.gif', 18, 16);
        imgStore.add('iconJoinTop', ip + 'jointop.gif', 18, 16);
        imgStore.add('iconJoin', ip + 'join.gif', 18, 16);
        imgStore.add('iconJoinBottom', ip + 'joinbottom.gif', 18, 16);

        //Add folder and document images to the imgStore.
        imgStore.add('Folder', ip + 'folderclosed.gif', 18, 16);
        var di = ip + ((theBrowser.code == 'NS') ? 'document2.gif' : 'document.gif');
        imgStore.add('Document', di, 18, 16);
}
function initialise() {
        // Set up some options
        theMenu.autoScrolling = true;  
        theMenu.modalFolders = false;
        theMenu.linkOnExpand = false;
        theMenu.toggleOnLink = false;
        theMenu.menuTop = 40;
        theMenu.entryHeight = 16;
       
        initOutlineIcons();
       
        // Now set up the menu with a whole lot of addMenu and addChild function calls
        var level1ID = -1;
        var level2ID = -1;
        var level3ID = -1;

        level1ID = theMenu.addMenu(-1, "Folder", "<B>CRT Contacts</B>", "", "Who do we know?");
       
        level2ID = theMenu.addChild(level1ID, "Document", "Speed Dial Numbers", "../crtinfo/abbdial.htm", "Find those telephone numbers");
        level2ID = theMenu.addChild(level1ID, "Document", "Some Useful Web Sites", "../crtinfo/httpmem.htm", "See what others are up to");      
       
       
        level1ID = theMenu.addMenu(level1ID, "Folder", "<B>Publications/Reports</B>", "", "Expertise within.");
        level2ID = theMenu.addChild(level1ID, "Document", "Ozone", "../crtinfo/ozregs.htm", "Ozone Depleting Substances Legislation");
        level2ID = theMenu.addChild(level1ID, "Document", "Perishables", "../crtinfo/booklet/cover.htm", "The Transport of Perishable Foodstuffs");
       
        level2ID = theMenu.addChild(level1ID, "Document", "Web Page", "../crtinfo/webpage.htm", "CRT Information on the Internet");
       
        level1ID = theMenu.addMenu(level1ID, "Folder", "<B>Specs/Prices/Services</B>", "", "CRT Services Information");
        level2ID = theMenu.addChild(level1ID, "Document", "Chambers", "../offint/crtinfo/chambers.htm", "Test Chamber Specifications");
        level2ID = theMenu.addChild(level1ID, "Document", "Enquiries", "../crtinfo/enquiry.htm", "Enquiries");

        level2ID = theMenu.addChild(level1ID, "Document", "K-Test", "../crtinfo/ktest.htm", "The Cambridge K-Test");

        level1ID = theMenu.addMenu(level1ID, "Folder", "<B>How to...</B>", "", "Some information for those wondering what this all about");
        level2ID = theMenu.addChild(level1ID, "Document", "Perform ATP Tests", "../crtinfo/atp/proc/atpdsk.htm", "ATP Procedure File Index");
       
}

// Declare global variables
var theMenu = new Menu;
var theBrowser = new browserInfo;
var imgStore = new imgStoreObject;
var statusTimeout = 0;

var floatingMode = (getMode() == 'Floating');
var myOpener = null;
if (floatingMode == true) {
        if (window.opener) {
                myOpener = window.opener;
                myOpener.setTimeout('setGlobals();', 10);
        } else {
                document.cookie = 'mode=Frames; path=/';
                floatingMode = false;
        }
}

//      ############################      ############################


window.defaultStatus = "";      
//-->

</script>

</HEAD>
<SCRIPT LANGUAGE="JavaScript">

<!--
if (self.name == 'menu') {
        // Sometimes, Netscape will try to load this index inside the menu frame.  I haven't
        // worked out why but this will detect that situation and reset the location property.
        self.location = "menu.htm";
} else {
        initialise();

        var thePage = 'home.htm';
        var theSearch = self.location.search;
        if (theSearch != null && theSearch !='') {
                if (theSearch.length > 1) {
                        thePage = theSearch.substring(1, theSearch.length);
                        theMenu.setEntryByURL(thePage, true);
                }
        }

        if (floatingMode) {
                self.document.writeln('<frameset cols="100%" rows="*,48" onUnload="unloadFloating();">');
                self.document.writeln('<frame name="menu" src="menu.htm" scrolling="auto" marginwidth="1" marginheight="1">');
                self.document.writeln('<frame name="menuCntrl" src="menucntrl.htm" scrolling="no" marginwidth="0" marginheight="0">');
                self.document.writeln('</frameset>');
        } else {
                        self.document.writeln('<frameset cols="150,*" rows="100%">');
                        self.document.writeln('<frame name="menu" src="menu.htm" scrolling="auto" marginwidth="1" marginheight="1">');
                        self.document.writeln('<frame name="text" src="' + thePage + '" scrolling="auto" marginwidth="5" marginheight="5">');
                self.document.writeln('</frameset>');
                }
}
//-->

</SCRIPT>
<NOFRAMES>
<BODY BGCOLOR=#FFFFCC>
Your browser does not support JavaScript (if you are using Netscape 3 or higher or Microsoft Internet
Explorer 4 or higher you may have JavaScript turned off in your network preferences), so this page,
does not include site navigation features. If you use
a JavaScript-capable browser, such as Microsoft <A HREF="http://microsoft.com/ie/ie.htm">Internet
Explorer version 3.0</A> or <A HREF="http://www.netscape.com/comprod/mirror/">Netscape Navigator
version 2.0</A>, you'll have a much more pleasant experience navigating around this site.
<P>
<I><B>Note:</B> There is a know bug in Netscape Navigator version 4.0.x which will cause you to see this message
if you have the local cache turned off.</I>
<P>
If you have any problems with this site, please contact the Webmaster of this site.


</BODY>
</noframes>

</HTML>

Left frame .../menu/menu.htm :

<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="ROBOTS" CONTENT="NOINDEX,NOFOLLOW">
<STYLE TYPE="text/css">
<!--
        .menuItem {position:absolute; left:0px; visibility:hidden;}
        .node { color: black }
        .node A:link { color: black }
        .node A:visited { color: black }
        .node A:active { color: red }
        .leaf { color: black }
        .leaf A:link { color: black }
        .leaf A:visited { color: black }
        .leaf A:active { color: red }
-->
</STYLE>
<script language="JavaScript">

<!--
function replace(newURL) {
        if (navigator.userAgent.indexOf('MSIE 3') >= 0) {
                self.location.href = newURL;
        } else {
                if (self.location.replace) {
                        self.location.replace(newURL);
                } else {
                        self.location.href = newURL;
                }
        }
}
if (self.name != 'menu') {
        replace('index.htm');
}
//-->

</script>
</HEAD>
<BODY BGCOLOR=#59AFFF LINK=#000000>
<FONT FACE="ARIAL, MS SANS SERIF, SANS-SERIF" SIZE="4">
<b>Site Plan</b></FONT><P>
<FONT FACE="GENEVA, ARIAL, MS SANS SERIF, SANS-SERIF" SIZE="1">
<SCRIPT LANGUAGE="JavaScript">

<!--
if (self.name == 'menu') {
        parent.theMenu.draw();
}
//-->

</SCRIPT>

</FONT>

</BODY>
</HTML>

The initial right hand frame is called ...menu/home.htm

I'm not sure how it all works. But it works a treat.

Cheers
0
 

Expert Comment

by:marcelmulder
ID: 1854545
Set the basetarget to your second frame
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question