tags:

views:

21

answers:

2

On my web page I plan to have a "header" containing links to different parts of my site. The same "header" will be present on every page. My header also contain an image.

I started to implement this idea and start to think about frames. I though that my be I should put my header in a frame and the main content will be displayed in another frame. I though that in this way I can avoid reloading of the header. It is always present and only content of the second frame is reloaded (as result of clicking links in the header). Can it be done in this way. Or, in other words, can I initiate reloading of frame B by clicking links in frame A (without reloading of frame A)?

+2  A: 

sure, use the target attribute:

<a href="whatever.html" target="another-frame-name">

But please consider not using frames, as usually it creates horrible user experience.

unbeli
+1  A: 

Yes, you can. That's what A's target attribute is for.

Say that you have two frames, top one is named header, main one is called content.

Then, in your header, add target="content" to your links. This will tell browser to load whatever href you specified in links inside of a named frame.

One note, though. You would want to create site without frames these days.

mr.b