Link to home
Start Free TrialLog in
Avatar of pwill40
pwill40

asked on

Javascript OS Detection error

I need to re-direct users to different pages depending on what version of windows they are using.  I  have been using the following command to try and see what version is there

<script language="JavaScript">
  var detect = navigator.userAgent.toLowerCase();
  document.write(detect);
</script>

... this returns....

mozilla/4.0 (compatible; msie 6.0; windows nt 5.1; .net clr 1.0.3705)

.. however I am running Windows XP Professional! does anyone know why it would find windows NT 5.1?  is there a different command I should be using?

Obviously I have very little knowledge of Javascript, and any assistance would be helpful.

Thanks,
Paul
ASKER CERTIFIED SOLUTION
Avatar of dorward
dorward

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pwill40
pwill40

ASKER

Thanks for the answers,
that cleared things up,

Cheers,
Paul