Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: browser compatibility


Message #1 by "Culus Eric" <culus.eric@s...> on Wed, 20 Mar 2002 15:51:08
Hello,

Take a look at this:
----------------------------------------
var ns4 = (document.layers) ? 1 : 0;
var ie4 = (document.all) ? 1 : 0;
var ns6 = (document.getElementById && !document.all) ? 1 : 0;

if(ns6) {
  document.getElementById('linkcountry01').href='http://www.google.com';
  ...
else if(ns4) {
  document.XXX('linkcountry01').href='http://www.google.com';
  ...
else if(ie4) {
  document.all('linkcountry01').href='http://www.google.com';
  ...
-----------------------------------------------
what do i need to put in the place of the XXX if you know 
that 'linkcountry01' is the "name" of a link-tag.

Regards,
Eric Culus

  Return to Index