Re: Need help with common web page information

by "Bert Doorn" <bert(at)betterwebdesign.com.au>

 Date:  Fri, 28 Dec 2001 23:03:14 +0800
 To:  <hwg-basics(at)hwg.org>
 References:  yahoo WORKGROUP
  todo: View Thread, Original
G'day

> JavaScript needs to be very short or not placed on vital pages.  I use it
a
> lot, but mostly on shopping cart pages to ensure the customer selects
sizes,
> colors etc.

So..  If one is going to use Javascriopt for vital links, provide an
alternative in the SAME link.   Set up a small javascript function in the
HEAD of the document, along these lines:

function GoToURL(whichURL)
{
  location=whichURL;
  return false
}

Then, set your links up like this

<.a href="whatever.html" onclick="return
GoToURL('something-else.html');">Whatever</a>

Browsers with javascript will follow the onclick.  Browsers without it
(including search engines) will follow the normal link.   The function can
be anything you like, including a (dare I say it) Pop Up windows.  I have
used this on some sites, such as www.aromaterra.com (go to the contact page)

Regards
--
Bert Doorn, Web Developer
CIW Associate, IWA Member
www.betterwebdesign.com.au
Fast Loading, User Friendly Websites

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA