[thelist] calling non default pages in a frameset
Walter Lee Davis
waltd at wdstudio.com
Tue Jan 16 18:31:31 CST 2001
It would depend on your server-side scripting setup (or you could do this
in JavaScript, too), but the basic idea is to have your frameset page write
its own frame src statements based on querystring variables. Here you go in
PHP:
<?php
#this is frameset.php
if (!$header || !$main) {
$header = "navbar.html";
$main = "body.html";
}
?>
<frameset rows = 100,* frameborder = 0 blah blah blah>
<frame src=<?php echo($header); ?>>
<frame src=<?php echo($body); ?>>
</frameset>
//end of frameset.php
Call it thusly: frameset.php?header=nav2.html&main=books.html
This isn't perfect, but it should get you going. The same thing could be
done in just about any server-side scripting environment, including CGI. I
got the idea initially from a JavaScript implementation on the
Communication Arts site: http://www.commarts.com so it's certainly possible
in that mode, although it requires JS on the client to work at all.
Hope this helps,
Walter
>
>i'm linking to a website that uses 3 different framesets & want to know how
>to write a hyperlink that will call a specified page to appear in a
>specified frameset. i.e. i've got a link in the sitemap, in the "homepage"
>frameset, click on "books for sale" and want the "books" page to come up in
>the "bookstore" frameset. "books.htm" is NOT a default page for the
>bookstore frameset.
>any suggestions?
More information about the thelist
mailing list