|
This next bit of code is the actual frameset and is written in two
examples ASP & PHP. The first part of the code written in ASP
utilises the ASP built in IsEmpty function. This is only required if the
frameset will be linked to without any parameters being passed, it sets
a default page (about-us.htm in this example) to be called into the main
frameset if the parameter or QueryString is found to be empty. This is
helpful in the case of where the actual frameset has been returned by
the search engines as a default page will be loaded.
If you wish to pass the parameter or
QueryString to the frameset via a link then the link can simply look
something like this: <a href="openFrame.asp?openFrame=about-us.htm>
about us</a>.
In these examples I have used nav.htm for
the page that holds the sites navigation and this should be changed to
whichever page name you wish to use. I.e. <frame name="contents"
target="main" src="nav.htm">
ASP (VBScript) This page must be named openFrame.asp
PHP This
page must be named openFrame.php and have PHP4 or better installed on
the server.
In this example I have not
included a default page to load if the parameter or QueryString is
empty. The use of a link to pass the parameter is still the same as if
using ASP If you wish to pass the parameter or
QueryString to the frameset via a link then the link can simply look
something like this: <a href="openFrame.asp?openFrame=about-us.htm>
about us</a>.
|