Keep your Banner Waving
Category: Home Based Business - Marketing | Date: 2003-06-18 |
Do everything you can to keep visitors on your site, the experts say. Give your audience great content and interactive tools. Provide fresh information and product listings that keep them coming back.
The experts also say to limit links to other sites, especially on your home page. If visitors leave your site for greener pastures, they may never come back.
Good advice, all. But, what if a goal of your site is to provide links to valuable resources at other sites? Perhaps youre a champion of the efficacy of the web, in that it is the ultimate information-sharing medium.
Not to worry. You can do as we did at WEBtheJOINT. Provide your visitors links to relevant goodies that others have built, but with a constant reminder of your site and a way to get back (besides the browsers Back button).
A simple yet effective solution is framesets, where you can place your banner at the top of the window when you send visitors elsewhere.
Heres how to do it using PHP.
First, create a simple PHP program called "frameset.php" in your root directory. Heres the code:
~~~~~~~~~~~ ( begin frameset.php code ) ~~~~~~~~~~~1. 2. 3.Your Site Name 4. 5. 6. $t = "../banner.htm";7. ?>8. 12. 13. 14. ~~~~~~~~~~~ ( end frameset.php code ) ~~~~~~~~~~~
Expand on the HTML as needed. For one, you might add a NOFRAMES tag within the BODY tag (line 12) to accommodate older browsers that cant handle frames. And, you might need to modify the path references to match your servers file structure on line 6.
Change the "27" (meaning that the top frame will be 27 pixels tall) in line 8 to match the height of the banner you want to display. Keep that number small, so that your banner doesnt use too much of the screen real estate.
Next, create a simple HTML file and call it "banner.htm" (as referenced in line 6 above. Heres the simplified code for that file:
~~~~~~~~~~~ ( begin banner.htm code ) ~~~~~~~~~~~1. 2. 3.Your Site Name 4. 5. 6. 7. My Home Page8. -- add other links here --9. 10. ~~~~~~~~~~~ ( end banner.htm code ) ~~~~~~~~~~~
In the vicinity of lines 7 and 8, add the HTML code that you want for your banner. We use a one-row, six-cell table that spans the width of the window, and contains our logo with a link to our home page as well as links to the top five sections of our site. If you use any images here, keep them small in height. We use one image in ours and its height attribute matches the ROWS attribute in line 8 of frameset.php.
With these two pieces in place, youre ready to modify the links on your pages to use the frameset.
For example, if you have a link to WEBtheJOINT, your anchor tag would normally look like this:
WEBtheJOINThttp://www.webthejoint.com">WEBtheJOINT>
Modify the anchor tag so that you open WEBtheJOINT within your own frameset, so that your banner appears at the top of the window:
WEBtheJOINThttp://www.webthejoint.com">WEBtheJOINT>
What comes after the "?dest=" becomes the PHP variable value that is passed to line 10 of frameset.php.
Thats all there is to it. Note that some sites are coded so that they escape from framesets imposed by others. Youll have no control over that. Weve found a few sites (especially affiliate links) that absolutely wont open within a frameset. You may get an "invalid link" or other error message in these cases. Your best bet is to test each link before implementing.
If you want to see this technique in action, copy the following line into your browsers address box and replace the xs with your sites address:
http://webthejoint.com/fset.php?dest=http://xxxxxx
Get the best of both worlds by using this PHP-driven frameset technique to keep visitors in touch with your site while giving them the additional resources and links they need.
by Keith Reichley January, 2001
About the Author
Keith Reichley is webmaster for webthejoint.com, the web resource center for small business. Contact Keith at keith@webthejoint.com
keith@webthejoint.com
http://www.webthejoint.com
The experts also say to limit links to other sites, especially on your home page. If visitors leave your site for greener pastures, they may never come back.
Good advice, all. But, what if a goal of your site is to provide links to valuable resources at other sites? Perhaps youre a champion of the efficacy of the web, in that it is the ultimate information-sharing medium.
Not to worry. You can do as we did at WEBtheJOINT. Provide your visitors links to relevant goodies that others have built, but with a constant reminder of your site and a way to get back (besides the browsers Back button).
A simple yet effective solution is framesets, where you can place your banner at the top of the window when you send visitors elsewhere.
Heres how to do it using PHP.
First, create a simple PHP program called "frameset.php" in your root directory. Heres the code:
~~~~~~~~~~~ ( begin frameset.php code ) ~~~~~~~~~~~1. 2. 3.
Expand on the HTML as needed. For one, you might add a NOFRAMES tag within the BODY tag (line 12) to accommodate older browsers that cant handle frames. And, you might need to modify the path references to match your servers file structure on line 6.
Change the "27" (meaning that the top frame will be 27 pixels tall) in line 8 to match the height of the banner you want to display. Keep that number small, so that your banner doesnt use too much of the screen real estate.
Next, create a simple HTML file and call it "banner.htm" (as referenced in line 6 above. Heres the simplified code for that file:
~~~~~~~~~~~ ( begin banner.htm code ) ~~~~~~~~~~~1. 2. 3.
In the vicinity of lines 7 and 8, add the HTML code that you want for your banner. We use a one-row, six-cell table that spans the width of the window, and contains our logo with a link to our home page as well as links to the top five sections of our site. If you use any images here, keep them small in height. We use one image in ours and its height attribute matches the ROWS attribute in line 8 of frameset.php.
With these two pieces in place, youre ready to modify the links on your pages to use the frameset.
For example, if you have a link to WEBtheJOINT, your anchor tag would normally look like this:
WEBtheJOINThttp://www.webthejoint.com">WEBtheJOINT>
Modify the anchor tag so that you open WEBtheJOINT within your own frameset, so that your banner appears at the top of the window:
WEBtheJOINThttp://www.webthejoint.com">WEBtheJOINT>
What comes after the "?dest=" becomes the PHP variable value that is passed to line 10 of frameset.php.
Thats all there is to it. Note that some sites are coded so that they escape from framesets imposed by others. Youll have no control over that. Weve found a few sites (especially affiliate links) that absolutely wont open within a frameset. You may get an "invalid link" or other error message in these cases. Your best bet is to test each link before implementing.
If you want to see this technique in action, copy the following line into your browsers address box and replace the xs with your sites address:
http://webthejoint.com/fset.php?dest=http://xxxxxx
Get the best of both worlds by using this PHP-driven frameset technique to keep visitors in touch with your site while giving them the additional resources and links they need.
by Keith Reichley January, 2001
About the Author
Keith Reichley is webmaster for webthejoint.com, the web resource center for small business. Contact Keith at keith@webthejoint.com
keith@webthejoint.com
http://www.webthejoint.com
Copyright © 2005-2006 Powered by Custom PHP Programming