[thelist] A simple Javascript question

Andrew Clover and at doxdesk.com
Tue Jan 22 15:44:00 CST 2002

> But is it wise to use this method. Questions spring to mind:
> Can Search Engines crawl them?
> Will it work on all platforms and browsers.

If you write it such that the links will work without JavaScript too, yes,
it's possible.

Try a form like this:

  <a href="somepage.html"
  onclick="window.open(this.href, '_blank', '...'); return false;">

This will open a new window with the specified '...' options if left-
clicked with JS turned on, but will still work with search engines and
browsers that don't support it, and it won't break functions like 'save
target', 'open link in new window' and so on.

For details of the '...' options, see:


Kudos for asking - many authors seem not to care!

Andrew Clover
mailto:and at doxdesk.com

More information about the thelist mailing list