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:
- HTML
- CSS
- JS
No. of HTTP Requests for a typical frameset (top, left, right)
- HTML (of frameset)
- HTML (of top)
- CSS (of top)
- JS (of top)
- HTML (of left)
- CSS (of left)
- JS (of left)
- HTML (of right)
- CSS (of right)
- JS (of right)
精彩评论