PDA

View Full Version : Frames are a pain in the butt


overmyhead
04-21-2007, 04:20 AM
ok so apparently I'm not the only one who thinks that frames suck but I really don't know an alternative. Here is my plan, I want a navigation side bar which will be a flash drop down menu... as soon as I learn how to get it to work with dreamweaver... and then a top banner and that will have a flash animation which I do know how to put in there and then the mainpage that will change per button click and so on... what else can I do rather than frames? and any quick answer on how to make the flash buttons work for dreamweaver pages.. I just don't know how to set the source link per button.

Rich_A06
04-21-2007, 01:21 PM
Damn just typed out load of stuff but closed window doh! Frames are OK if you know how to work around their cons. Cons being no URL and jump menus won't work in their own window if the target is to a frame.

The solution is to make a noframes folder in root and make a kind of sub web site. This is only needed if you want pages that include jump menus and you want those to be printable. Printing a frameset can cause problems so your best bet is to make a hyperlink on all pages you want to print 'Open this page in a new tab' and set target to 'blank'. This will open a new frameless window. The trick is though to hyperlink to the pages in your noframes folder. The pages in your noframes folder are frameless simple pages. These pages are exactly the same as your frames pages except the target is Main frame onChange="MM_jumpMenu('parent',this,0) which is the same as 'top'. Jump menus can only target to 'top' or a frame name. Targeting to a frame is done when creating the jump menu and creates code like onChange="MM_jumpMenu('parent.frames[\'frame main\']',this,0).

Anyhow, more important is to not use a frameset because it means having to save all frames for all pages which is a waste. The solution is iframes. This is the kind of code FP produces ..


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>

<p>
<iframe name="I1" width="1028" height="150" src="http://" scrolling="no" border="1" frameborder="1">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe></p>
<p>
<iframe name="I2" width="227" height="583" src="http://" scrolling="no" border="1" frameborder="1">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
<iframe name="I3" width="787" height="583" src="http://" scrolling="no" border="1" frameborder="1">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe></p>

</body>

</html>

It's great because an entire frameset can be kept in one file, it's all in the body of a page. And now you can save all pages as a frameset and so the URL will change.

That code won't work in DW designer view but it will work when previewing it from DW. You can set targets for each frame too i.e. have a link in one frame open a page in another frame. AFAIK only Frontpage 2003 and up have full GUI support for iframes.

domedia
04-21-2007, 02:53 PM
Dreamweaver templates -> great approach to make your site consistent without the use of frames.

Rich_A06
04-21-2007, 03:20 PM
Yes sure but if you want a fixed unmoving area that can link to and open pages in another area, the only was to do it is to use frames! They can essentially add a toolbar to a page and you can't argue that that isn't a nice thing to have.

The easiest way to use frames is to create an iframes frameset with FP.

domedia
04-21-2007, 04:49 PM
Yes sure but if you want a fixed unmoving area that can link to and open pages in another area, the only was to do it is to use frames! Nonsense, but I'm not going to argue :)

chriskq
04-23-2007, 12:30 PM
dom is right. think about it, frames is a outdated technology/methadology. theres so many other ways to do it. u sound like ur into flash - so why not make the whole site in flash sections.

OR

you could use javascript toggle if u only have a few pages (the more content & multimedia, longer load times as all site content will load at the start)

eg: http://apec2007.org/ which is a site i did for work (then they stuffed it up when they added content - lol)

in the main body part there are three buttons that change content.
apply that functionality

Rich_A06
04-24-2007, 05:21 PM
Found a way to make jump menus work both in frames and when that same jump menu is opened in a new tab..

onChange="MM_jumpMenu('self',this,0)