Improve Site Performance Increase Site Traffic Monitor Site Uptime Webmaster Resources NetMechanic Home Looking For Help? Partner Programs Privacy Policy Contact Us Press Room
NetMechanic Home LOGIN | HELP | ABOUT US | PRODUCTS | SITE MAP
NetMechanic Menu
Over 52 Million Web Pages Tested!     
 

Search for:


Your Email:

I would like to receive my newsletter in:
HTML format
Text format



Volume 8 (2005)
   September
   June
   April
   March
   January

Volume 7 (2004)
   November
   September
   July
   June
   May
   April
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 6 (2003)
   December
   November (Part 2)
   November
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part 2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 5 (2002)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 4 (2001)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part 2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 3 (2000)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June
   May
   April
   March
   February
   January

Volume 2 (1999)
   December
   November
   October
   September
   July
   June
   May
   April
   March
   February
   January

Volume 1 (1998)
   December
   November
   October
   September

 

JavaScript Tip:
Keep Your Windows Focused

by Larisa Thomason,
Senior Web Analyst,
NetMechanic, Inc.

  
December 2002 (Part 2)
Vol. 5, No. 24
 • JavaScript Tip
 • HTML Tip
 • Beginner Tip
  

One common complaint among users is that many sites contain broken links, so of course you test yours regularly (don't you?). But you probably never considered that some visitors might think your links are broken when they aren't! That can happen when you use JavaScript to open new windows and control their placement. Fortunately, one single line of JavaScript code solves that problem!

Keep The Window On Top

In a previous JavaScript Tip, we showed you how to put your window where you want it using a short JavaScript function.

You can do a lot with this script:

  • Advertise special offers.
  • Encourage newsletter subscriptions.
  • A navigation window for the rest of the site.
  • A table of contents list.

You can even use it to send all your links to the same target window and avoid annoying visitors by cluttering their desktop with a lot of open browser windows. But, although you're trying to be helpful, that technique can sometimes confuse your visitors.

That's because some browsers keep the original window in focus (meaning it's the top browser window) when they load a page into the second browser window. Since the new page doesn't appear automatically, the visitor may just assume that the link is broken.

This effect is easier to show than describe! Follow these steps to see it in action:

  1. Both links open in the same browser window.

  2. Click on the first link and our homepage opens in a new browser window.

  3. Without closing it, return to this window and click on the second link to see the newsletter home page.

NetMechanic Home Page

Webmaster Tips Newsletter

See how the new window drops behind this window - and stays there? Control this problem by adding one line of code to your function that opens the new browser window.

All you need to do is give the new window focus by adding this line of code to your function:

winContent.focus()

The whole function looks like this. Note: If you copy and paste this function to your own Web page, make sure the definition for winContent is all on one line in the HTML code. Otherwise, the function won't work!

Then, call the JavaScript function inside your HREF tags:

See how it works now:

NetMechanic Home Page

Webmaster Tips Newsletter

Don't Annoy Visitors

Don't get too excited and misuse this! There are perfectly legitimate reasons to keep a window open in front of visitors. But don't use it to trap unwilling visitors into reading your content and/or advertisements if they're not interested. There are plenty of Web sites that don't annoy visitors and it's easy to find them. Be sure you avoid techniques that may drive people away from your site.

Visitors leave your site when you use techniques that confuse or annoy them, so it's important to identify and potential problems before you lose traffic.

Think about some Web site problems that turn you away:

HTML Toolbox can help you with all three problems. It contains a link check feature that automatically checks your links, identifies and corrects HTML coding errors that can break your page, and identifies slow-loading pages.

Although external links are useful to visitors and can help you improve your link popularity score, remember that your main goal is to keep visitors at your site - and bring them back to the site - as often as possible. For that, you need an attractive site that works for all visitors!



Rate This Tip:
Not Useful Useful Very Useful   
 
NetMechanic Tools
HTML Toolbox
Browser Photo
Server Check
Search Engine Starter
Search Engine Tools
GIFBot
Newsletter
HTML Tutorial and Tips
Search Engine Tutorial
Accessibility Information
Browser Problem Tutorial

Company Info
Products
About Us
Contact
Advertise
Link To Us
Jobs
Privacy Policy
Partner Programs
Press Room
RSS Feed
Support
 



Powered by Overture!

 
     
 
   
 
     


Keynote Home
Copyright © 1996-2007,
Keynote NetMechanic
All rights reserved.