HTML Forms
 A basic introduction to using forms. Breakdown of a forms anatomy, how they are submitted and processing the forms information.

Website: About Us ◄    ► Portfolio ◄    ► Contact Us

 







Website Hosting
Website Design
CDROM Productions
SEO
Database Design
Business ISP Services
Residential ISP Services

 

 





SEO Tips
Search Engines
Forms
Frames
ASP
 




About Us
Portfolio
Contact Us
Articles


Home

 
 

The following examples require 3 pages: The frameset page (openFrame.asp) & in this example a page that contains the sites navigation (nav.htm) + the page that is required to open in the frame set.

Please Note: The following code snippets are Copy written to Vortex Media. You can use this code free of charge as long as the commented sections containing the copyright information remains intact. Please include a link back to www.vortexmedia.com.au if you use this code. By using the code below you agree that Vortex Media are not liable to you for any loss or damage ---- you know the drill, if you don't then read our disclaimer.

 
 

Let me know if this code was at all helpful!

 

The Code To Be Inserted Into The Page To Be Opened


This bit of code is written in JavaScript and should be inserted before the pages </head> tag.



Basically the code checks to see if the page has opened by itself or inside a frameset. If it is found to have opened by itself then the browser is redirected to openFrame.asp (if using PHP instead of ASP then change openFrame.asp to openFrame.php.
Pagetobeopened.htm is a parameter that is passed to the openFrame.asp page and should be changed to the actual page name being used.

If the openFrame directory is back a level from the calling page then href = should look like this "href = '../openFrame?openFrame=directoryName/pagetobeopened.htm' ".

 
   

openFrame.asp (the framset)


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>.

 
   

Testing


To test you pages simply type in your browser the direct url ie if I wanted to test about-us.htm which is a page that resides on the Vortex Media website I would type in my browser www.vortexmedia.com.au/about-us.htm
 

 
   

Search Engines


I have used this code extensively on most sites we produce that require framesets without any known compatibility issues with most search engines.  Pages that we have submitted that contain this code do not seem to be hindered in any way and seem to rank just as well as any other. I must stress though that individual search engines may not be able to index, list or rank pages that have this code built in and that Vortex Media are in no way responsible for any loss or damage arising from you when using this code. It is up to you to determine if this code suits your purposes and that you will not hold Vortex Media liable.

Roger Wills
Vortex Media
Programming Manager

 
   

Need Help With This Code


If you do find yourself having problems getting this code to work then please contact me at support@vortexmedia.com.au explaining the problems or errors you are having. I will try to get back to you quickly but please be aware that at times I am unable to reply to all requests in a speedy manner.

 

  Client Login
 

Disclaimer \ Privacy

© Vortex Media 2004
All Rights Reserved