Click to See Complete Forum and Search --> : Not Using Frames: Navigation Panic Station


PhotoDude
05-27-2008, 08:14 AM
Hello. I am wondering about scripted alternatives to frames and iframes. Basically, a site I am developing calls for a single index page containing a masthead logo and simple nav-bar (already finished) with an area below for loading content into.

The content box must be borderless, invisible and MUST NOT scroll. The nav links are simple text (currently <a href>). Possibilities include loading XML content into the HTML index page. Any thoughts on this would be appreciated.

rpgfan3233
05-27-2008, 12:38 PM
You can search on Google for scrolling divs since they're already a part of HTML and they don't have borders and such by default. The content could be loaded via JavaScript, or transformed via a server-side language and inserted in the appropriate spot before the page is rendered. One other alternative that used to be extremely popular was using Flash to handle the XML bit.

By the way, nice message title. It's very catchy. ^_^

PhotoDude
05-27-2008, 01:04 PM
Okay, first, thanks, I do try, secondly, uh what? These scrolling div's are news to me. Could you point to any resources, or give code examples? I am on a dodgy connection at the moment so googling is an inefficient way of working. Thanks for taking the time.

PhotoDude
05-27-2008, 02:23 PM
Um, I don't want it to scroll. Or be visible.

rpgfan3233
05-27-2008, 03:00 PM
Apologies for misinterpreting things. The way I read it, you wanted an alternative to frames, which typically have a content section that scrolls. :p

Anyway, if you had something like PHP available, you could do this:
example.php -
<body>
<?php include('nav_menu.php'); ?>
<div id="Content">
<!-- your content here -->
</div>
</body>

nav_menu.php -
<ul id="NavMenu">
<li><a href="#">Home</a></li>
<li><a href="#">Page 1</a></li>
<li><a href="#">Page 2</a></li>
<!-- and so on... -->
</ul>

That would result in the following being sent to a Web browser:
<body>
<ul id="NavMenu">
<li><a href="#">Home</a></li>
<li><a href="#">Page 1</a></li>
<li><a href="#">Page 2</a></li>
<!-- and so on... -->
</ul>
<div id="Content">
<!-- your content here -->
</div>
</body>

This is the alternative to frames that is most common. You could use CSS to get rid of the bullet points or replace them with your own image or whatever.

The other alternative involves Flash:
<body>
<object>
<!-- all of the params necessary for the Flash application to work -->
</object>
<div id="Content">
<!-- your content here -->
</div>
</body>

Of course, you would have to build your own Flash application to use the Flash version. :p

You might be helped a bit better in the HTML forum or the General forum than in the XML forum since this topic doesn't really pertain to XML. It is just a matter of moving from using frames to using something other than frames, which falls under the jurisdiction of the HTML or General forums.