English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

The frame on the left is my navbar. I want to make the links in my navbar change what's in the frame on the right - my main content frame. Please help x]

2007-08-29 07:02:52 · 6 answers · asked by x.becki 2 in Computers & Internet Programming & Design

6 answers

It's simply a matter of adding the target name into your links in the left sidebar, like this....

Page Two

check out the part "targeting links"on this page -

http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=110

2007-08-29 07:37:46 · answer #1 · answered by joyaz711 5 · 0 0

Without the javascript: (This is from a site I wrote)





Basically, the ' target="view_frame" ' in the left column tells the browser that any links in that frame will change the content of the other frame (which is named view_frame).

Remember that if you have links in the right-side frame which you don't want to load into that frame, but rather into a full window, put ' target="_blank" ' or ' target="top" ' in the link, to either open a new window, or replace the contents of the current window.

2007-08-29 07:42:20 · answer #2 · answered by Peter_AZ 7 · 0 0

there are alot of nice little snippets here but to be honest - you can do this without frames, java, javascript etc

i can do the same thing with 3 files and a php server-side call - with a top nav bar or side nav:
example of this is in this site i am on with:
http://www.the-lonestar.com

there are as i said 3 files:

header.***

page.*** (used for other pages), has 2 server-side calls

footer.***

here is the example of a blank page:

include "header.***";
?>


Blank Page:







Blank Page




include "footer.***";
?>


the header.*** - has the tags and maintable with logo and nav

the footer.*** - closes the main table, closes the and has the copyright and counter

that is a script i have put together as a basis for the sites i build

hope this helps to dispell a myth that frames and or fancy java are needed - as i know they are not

2007-08-29 08:47:20 · answer #3 · answered by dino d 3 · 0 0

Modify this code at will:

parent.main.location = hURL;

That is in JavaScript, to use do something like

Main



Where main would be your content frame.

I believe you can also do it like:

Main

This is the code I use on my site:

function parse(id){
parent.main.location = hURL[id];
for (var i=0; i < hURL.length/2; i++){
document.getElementById(2*i+1).style.backgroundImage = "url(../img/mnu/linkback.jpg)";
document.getElementById(2*i+1).style.color = "#B1AED2";
}
document.getElementById(id).style.backgroundImage = "url(../img/mnu/linkback_h.jpg)";
document.getElementById(id).style.color = "#000066";
return 0;
}

The code above is public domain.

2007-08-29 07:12:08 · answer #4 · answered by TRON 4 · 0 0

(Don't use frames! But...if you must...) Name the frame, using
id="soandso" then use target="#soandso"

2007-08-29 07:37:35 · answer #5 · answered by fjpoblam 7 · 0 0

look on pageresource.com

2007-08-29 07:31:10 · answer #6 · answered by SCIENCE_MAN_88@YAHOO.COM 2 · 0 0

fedest.com, questions and answers