views:

46

answers:

1

Folks, I want to create a webpage with three panes (frameLeft, frameMiddle, frameRight)

  • The content on leftmost pane is a list from file list.html

  • Upon clicking on an item in the leftmost pane, it loads the corresponding html file (call it listLvl2.html) in the middle pane. This is also a list.

  • Clicking further on an item in the middle pane should load the corresponding html file in the third frame (lets call it content.html)

I have made an index.html file with three frames. frameLeft loads list.html. I have coded list.html so that every link opens in the target="frameMiddle" . This works well

The issue is opening content.html in frameRight. What should I put as the target in my listLvl2.html links so that they open in frameRight? I tried putting it as frameRight, but instead, it opens in a new window. I guess that is because for listLvl2.html , frameRight is not defined.

+2  A: 

I would highly advise against this. Using Framesets kills bookmarking abilities and causes all kinds of other issues.

Create a single page, that uses common code fragments to display the top and left column content instead.

At first framesets seem like a great idea - only load stuff in the frames as you need it... but then other issues arise. Each frame needs to load its own copy of CSS and JavaScript resources, users can't bookmark a sub page, the title never updates to the correct page, nor does the URL.

Later if you envision a dropdown cascading menu over one frame from another you quickly learn that it isn't possible - period.

No. of HTTP Requests for a typical page:

  1. HTML
  2. CSS
  3. JS

No. of HTTP Requests for a typical frameset (top, left, right)

  1. HTML (of frameset)
  2. HTML (of top)
  3. CSS (of top)
  4. JS (of top)
  5. HTML (of left)
  6. CSS (of left)
  7. JS (of left)
  8. HTML (of right)
  9. CSS (of right)
  10. JS (of right)
scunliffe
hey this is for a very small project, to be used perhaps only by me in a local machine. i wouldnt use frames otehrwise
Amarsh
ok, np, for any frame loading, just put `target="name"` for the frame you want to target. As long as you defined the names in your frameset file, the links should all work.
scunliffe
Bummer! I was missing a " in my html file. Apologies for this. Your comments did made me think twice before using frames in the future. Thanks a lot.
Amarsh