PDA

View Full Version : Frames-Navagation Bar Menu



Toner
Nov 30th, 2000, 06:46 AM
Scenario:

I have a web page with three horizontal frames consisting of a header frame, a main frame, and a footer frame. I am using JavaScript to accomplish some of my tasks. I have an onMouseover menu drop down navigation menu located at the top of the main frame. Also in the main frame I have my home page. Whenever I move my mouse over one of my menu listings, a sub menu appears and I am able to click on one of my links. The problem is some of my links are for outside sources such as http://www.gatech.edu. I want the menu to remain at the top of the main frame when I open an outside web site in the main frame.

Can anyone provide the code or knowledge to me so that I may accomplish this.

Alien
Nov 30th, 2000, 10:34 AM
Hi

What you need to do is in your <a HREF> tab you need to add target="<Enter the name of the frame in here>" and it will appear. If the site you are linking to is set up so that it can't be framed then you won't be able to it.

Adam

Toner
Nov 30th, 2000, 12:08 PM
Adam,

I do not understand what you have written me. I have included my code in this post. Code is w/o < and >
-------------------------------------------------------
html
script language="JavaScript"

if (parent.frames.length==0) {
var rOut = ""
rOut += "frameset rows=\"45,*,35\" border=0
frameborder=no"
rOut += "frame src=kmed_top.html marginheight=5
marginwidth=10 scrolling=no leftmargin=10"
rOut += "frameset cols=\"*,10\" border=0
frameborder=no"
rOut += "frame src=kmed_main.html? marginwidth=24"
rOut += "frame src=blank.html
scrolling=no"
rOut += "/frameset"
rOut += "frame src=kmed_bottom.html
scrolling=no marginheight=5 marginwidth=10"
rOut += "/frameset"
do***ent.write(rOut)
}
/script

script language="JavaScript"
!--
function openWindow(myLink) {
if(! window.focus)return;
var myWin=window.open
("","external","height=400,width=600,dependent=yes,
scrollbars=yes,resizable=yes,toolbar=yes");
myWin.focus();
myLink.target="external";
}
--
/script

body width="100%" marginwidth="0" marginheight="0"
leftmargin="0" topmargin="0"
script language="JavaScript" src="menu.js"
/script
script language="JavaScript"
src="menucontext.js"/script
script language="JavaScript"
showToolbar();
/script
script language="JavaScript"
function UpdateIt(){
if (do***ent.all){
do***ent.all["MainTable"].style.top =
do***ent.body.scrollTop;
setTimeout("UpdateIt()", 200);
}
UpdateIt();
/script
/body
/html

[Edited by Toner on 11-30-2000 at 02:29 PM]

Alien
Dec 1st, 2000, 03:56 AM
Hi

Its been a while since I've done javascript. I think the problem is within this code.

script language="JavaScript"
!--
function openWindow(myLink) {
if(! window.focus)return;
var myWin=window.open
("","external","height=400,width=600,dependent=yes,
scrollbars=yes,resizable=yes,toolbar=yes");
myWin.focus();
myLink.target="external";
}

I believe that is the code you are using to go to an external site. Is this the case and if so at present is the site you are linking to opening up in a new window?

If this is the case do you want your menue to be added to the new window or do you not want a new window at all?

Adam