• 0

frame.htm


Question

so i have this code to have frames on my site:

<HTML>

<HEAD>

<TITLE>benquilter.com</TITLE>

</HEAD>

<FRAMESET COLS="15%,*" FRAMEBORDER=NO>

<FRAME SRC="navbar.htm">

<FRAME SRC="main.htm" NAME=DISPLAY>

</FRAMESET>

<NOFRAMES>Noframes content...

</NOFRAMES>

</HTML>

not really knowing much about html, i sorta got this off of a "how to" site, but it didn't really explain my problem i've now encountred. when i click on a link in the navbar, the new page opens where the nav bar is, not where the main portion of the site is. any ideas on how to modify the code to stop that would be great.

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0
actually, it should be:

&lt;a href="url_here.html" target="DISPLAY"&gt;

cuz the name of the frame is "DISPLAY"

oops :blush:

mofo is correct :rofl:

Link to comment
Share on other sites

  • 0

so the code should look like this?:

<HTML>

<HEAD>

<TITLE>benquilter.com</TITLE>

</HEAD>

<FRAMESET COLS="15%,*" FRAMEBORDER=NO>

<FRAME SRC="navbar.htm">

<FRAME SRC="main.htm" target="DISPLAY">

</FRAMESET>

<NOFRAMES>Noframes content...

</NOFRAMES>

</HTML>

Link to comment
Share on other sites

  • 0
so the code should look like this?:

<HTML>

<HEAD>

<TITLE>benquilter.com</TITLE>

</HEAD>

<FRAMESET COLS="15%,*" FRAMEBORDER=NO>

<FRAME SRC="navbar.htm">

<FRAME SRC="main.htm" target="DISPLAY">

</FRAMESET>

<NOFRAMES>Noframes content...

</NOFRAMES>

</HTML>

no....the page ur displaying there is your frames container. it was fine the way it was before.

you need to open your navbar.htm page

for every link you have in that page, add target="display" in every hyperlink.

example, you have a link that points to www.yahoo.com. the code in ur navbar.htm probably would like this <a href="www.yahoo.com"> since you don't specify a target, or what frame you want it displayed in, it displays the web page in the current frame (navigator frame).

change the hyperlink to <a href="www.yahoo.com" target="display">

Link to comment
Share on other sites

  • 0
do i need to change <FRAME SRC= to the whole "<a href=" thing?

no...post the contents of your navbar.htm file and i'll show you what needs to be changed.

Link to comment
Share on other sites

  • 0

hmm, its a lot, but ok:

<html>

<head>

<title>Navigation Bar</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script language="JavaScript">

<!--

function MM_preloadImages() { //v3.0

var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}

}

function MM_findObj(n, d) { //v4.0

var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];

for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);

if(!x && document.getElementById) x=document.getElementById(n); return x;

}

function MM_nbGroup(event, grpName) { //v3.0

var i,img,nbArr,args=MM_nbGroup.arguments;

if (event == "init" && args.length > 2) {

if ((img = MM_findObj(args[2])) != null && !img.MM_init) {

img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;

if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();

nbArr[nbArr.length] = img;

for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args)) != null) {

if (!img.MM_up) img.MM_up = img.src;

img.src = img.MM_dn = args[i+1];

nbArr[nbArr.length] = img;

} }

} else if (event == "over") {

document.MM_nbOver = nbArr = new Array();

for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args)) != null) {

if (!img.MM_up) img.MM_up = img.src;

img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];

nbArr[nbArr.length] = img;

}

} else if (event == "out" ) {

for (i=0; i < document.MM_nbOver.length; i++) {

img = document.MM_nbOver; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }

} else if (event == "down") {

if ((nbArr = document[grpName]) != null)

for (i=0; i < nbArr.length; i++) { img=nbArr; img.src = img.MM_up; img.MM_dn = 0; }

document[grpName] = nbArr = new Array();

for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args)) != null) {

if (!img.MM_up) img.MM_up = img.src;

img.src = img.MM_dn = args[i+1];

nbArr[nbArr.length] = img;

} }

}

//-->

</script>

</head>

<body bgcolor="" text="#666666" link="#666666" alink="#006699" vlink="#006699" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('images/main1.jpg','images/ben1.jpg','images/archives1.jpg','images/links1.jpg','images/boondocks1.jpg','images/forum1.jpg','images/gbook1.jpg','images/ben2.jpg','images/spacer.jpg','images/archives2.jpg','images/vocab2.jpg','images/links2.jpg','images/boondocks2.jpg','images/forum2.jpg','images/gbook2.jpg')">

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<div id="Layer1" style="position:absolute; width:69px; height:312px; z-index:1; left: 1px; top: 40px">

<table border="0" cellpadding="0" cellspacing="0">

<tr>

<td><a href="/BisForBen.html" onClick="MM_nbGroup('down','group1','Ben','',1)" onMouseOver="MM_nbGroup('over','Ben','images/ben2.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="Ben" src="images/ben1.jpg" border="0" onLoad="" align="absmiddle"></a></td>

</tr>

<tr>

<td><a href="#" onClick="MM_nbGroup('down','group1','spacer','',1)" onMouseOver="MM_nbGroup('over','spacer','images/spacer.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="spacer" src="images/spacer.jpg" border="0" onLoad=""></a></td>

</tr>

<tr>

<td><a href="/Archives.html" onClick="MM_nbGroup('down','group1','Archives','',1)" onMouseOver="MM_nbGroup('over','Archives','images/archives2.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="Archives" src="images/archives1.jpg" border="0" onLoad="" align="absmiddle"></a></td>

</tr>

<tr>

<td><a href="#" onClick="MM_nbGroup('down','group1','spacer2','',1)" onMouseOver="MM_nbGroup('over','spacer2','images/spacer.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="spacer2" src="images/spacer.jpg" border="0" onLoad=""></a></td>

</tr>

<tr>

<td><a href="http://benquilter.freeservers.com/Vocab/" onClick="MM_nbGroup('down','group1','Vocab','',1)" onMouseOver="MM_nbGroup('over','Vocab','images/vocab2.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="Vocab" src="images/vocab1.jpg" border="0" onLoad="" align="absmiddle"></a></td>

</tr>

<tr>

<td><img name="spacer5" src="images/spacer.jpg" border="0" onLoad=""></td>

</tr>

<tr>

<td><a href="/links-files.htm" onClick="MM_nbGroup('down','group1','LinksFiles','',1)" onMouseOver="MM_nbGroup('over','LinksFiles','images/links2.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="LinksFiles" src="images/links1.jpg" border="0" onLoad=""></a></td>

</tr>

<tr>

<td><a href="#" onClick="MM_nbGroup('down','group1','spacer4','',1)" onMouseOver="MM_nbGroup('over','spacer4','images/spacer.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="spacer4" src="images/spacer.jpg" border="0" onLoad=""></a></td>

</tr>

<tr>

<td><a href="http://www.ucomics.com/boondocks/viewbo.htm" onClick="MM_nbGroup('down','group1','Boondocks','',1)" onMouseOver="MM_nbGroup('over','Boondocks','images/boondocks2.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="Boondocks" src="images/boondocks1.jpg" border="0" onLoad="" align="absmiddle"></a></td>

</tr>

<tr>

<td><a href="#" onClick="MM_nbGroup('down','group1','spacer3','',1)" onMouseOver="MM_nbGroup('over','spacer3','images/spacer.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="spacer3" src="images/spacer.jpg" border="0" onLoad=""></a></td>

</tr>

<tr>

<td><a href="http://pub32.bravenet.com/forum/show.php?usernum=2674608467&cpv=1" onClick="MM_nbGroup('down','group1','Forum','',1)" onMouseOver="MM_nbGroup('over','Forum','images/forum2.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="Forum" src="images/forum1.jpg" border="0" onLoad="" align="absmiddle"></a></td>

</tr>

<tr>

<td><img name="spacer6" src="images/spacer.jpg" border="0" onLoad=""></td>

</tr>

<tr>

<td><a href="/gbook.htm" onClick="MM_nbGroup('down','group1','GBook','',1)" onMouseOver="MM_nbGroup('over','GBook','images/gbook2.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="GBook" src="images/gbook1.jpg" border="0" onLoad=""></a></td>

</tr>

</table>

</div>

<p>

<!-- The following line of code must be on one line, it can not wrap // -->

</p>

<p>

<script language="JavaScript" src="http://pub32.bravenet.com/minipoll/show.php?usernum=2674608467&cpv=1">

</script>

</p>

</body>

</html>

Link to comment
Share on other sites

  • 0

[change the following:

? ? ?

<td><a href="/BisForBen.html" onClick="MM_nbGroup('down','group1','Ben','',1)" onMouseOver="MM_nbGroup('over','Ben','images/ben2.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="Ben" src="images/ben1.jpg" border="0" onLoad="" align="absmiddle"></a></td>

to <a href="/BisForBen.html" target="display" onClick="MM_nbGroup('down','group1','Ben','',1)" onMouseOver="MM_nbGroup('over','Ben','images/ben2.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="Ben" src="images/ben1.jpg" border="0" onLoad="" align="absmiddle"></a></td>

notice how after the <a href="/BisForBen.html" I inserted target="display"

do that for the rest of your <a href>'s and it should work. the target tells the browser where you want /BisForBen.html to be displayed (in the frame you named display)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.