开发者

html multiple frames navigation

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 leftm开发者_Python百科ost 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.


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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜