Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frames 101.... problem with navigation bar...

Status
Not open for further replies.
Oct 2, 2002
104
0
0
US
I have a website,
I built it in dreamweaver, and have modified the html myself, where needed.

Anyhoo, I have 2 frames... one for navigation (on the left) and one for content (on the right.)

Currently, if i click a link on the navigation bar, it opens in the SAME window (navigation window) NOT the content window, obviously, I want to change this.

I have pictures in the navigation bar, which, when clicked, should change the content in the main frame....

here is my code:
href=&quot; target=&quot;_parent&quot;><span style='color:windowtext;text-decoration:
none;text-underline:none'><img border=0 width=300 height=209

As you can see, I am using the target &quot;target=&quot;_parent&quot;&quot;
But, it doesn't seem to work.

I think the problem is that the main frame is not designated as the parent frame....

My question: how do i specify a frame as a &quot;parent&quot; or &quot;child&quot; and is there an easy way to do this inside Dreamweaver 4?
 
In the frame tag for the main window, you need to add
Code:
name=&quot;main&quot;
... than change the link targets to be
Code:
target=&quot;main&quot;
. -gerrygerry

&quot;I'm doin' a one-nighter for bitin' Ed the mail man... the guy was tryin' to cast a spell on me... like a wizard or something.&quot;
&quot;Are you sure about that?&quot;
&quot;I dunno... maybe he was just wavin' [wavey]...&quot;
 
So, change the target from &quot;_parent&quot; to &quot;main&quot;?

Also, where is the frame tag, and how can I add something to it?
 
The frame tag is in the file that has the frames (I imagine it's probably your index or default file). Change the target to whatever you name the frame as...

----------------------------
<FRAME name=&quot;main&quot; ...
...
<A href=&quot;...&quot; target=&quot;main&quot;
----------------------------
<FRAME name=&quot;kwijibo&quot; ...
...
<A href=&quot;...&quot; target=&quot;kwijibo&quot;
----------------------------
<FRAME name=&quot;NickTheNewbie&quot; ...
...
<A href=&quot;...&quot; target=&quot;NickTheNewbie&quot;
----------------------------

Understand?

I don't use Dreamweaver, and IMHO I don't think it's a good idea that you do either. Learn to hardcode everything first, then consider using Dreamweaver as a small utility... nothing more. Not knowing where the <FRAME> tag is indicates a lack of understanding... an understanding that is crucial to develop anything on the web!

Good luck! Please post any questions you have here in the forums... someone will always respond :) -gerrygerry

&quot;I'm doin' a one-nighter for bitin' Ed the mail man... the guy was tryin' to cast a spell on me... like a wizard or something.&quot;
&quot;Are you sure about that?&quot;
&quot;I dunno... maybe he was just wavin' [wavey]...&quot;
 
Nick,
A two-paned framed page, for example, consists of three pages.
Obviously, two of them are the two pages that fill the panes.
The third is the document that sets up the size and location and initial contents of the other two frames.

This third page (often called index or default or some such name) is the page that holds the settings for the viewable document (i.e.: frame name).
It has this structure:
<html>
<head>
</head>
<frameset>
<frame...name='foo', etc>
<frame...>
</frameset>
</html>

...whereas the pages that appear in the frame's panes have this general structure:
<html>
<head>
</head>
<body>
</body>
</html>

Hope this helps...
-Daniel He is no fool who gives what he cannot keep to gain what he cannot lose.
- Jim Elliot
 
Nick,
Also,
within your pages, try to stay away from 'absolute addressing' of your linked pages. Example:


The page would still open if referred to by simply:
contact.htm

When you include the complete address, it has to open a new connection, rather than just loading the new page.

it also increases your file size, thereby increasing load time for clients.

-Daniel He is no fool who gives what he cannot keep to gain what he cannot lose.
- Jim Elliot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top