Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Test OS version, show relevant text

Status
Not open for further replies.

JPJeffery

Technical User
May 26, 2006
600
0
0
GB
Hi

I'm completely new to Javascript and was trying to achieve the desired effect with VBScript. However, I'm given to understand that VBScript is

A) Considered insecure (so may not run) and
B) Doesn't run under Firefox (probably because of A))

...and therefore, I'm given to understand, Javascript is a better bet all round for at least these reasons alone. So, here I am, on the scrounge.

What we're trying to achieve an index.html file on a CD which tests the version of the OS (Windows XP, Vista, 7 or MAC OS) then shows ONLY the link for the correct version of the software (Cisco VPN if you must know!) for the computer's OS.

Currently our Index.html file is dumb and shows all four options, which of course then offers the user the opportunity of clicking on the wrong one!

Normally I'd happily research this a little more and learn Javascript while I'm at it, but time is short, and all I've found so far wasn't very helpful.

Can anyone help or at least point me to an FAQ which has this info in?

JJ
[small][purple]Variables won't. Constants aren't[/purple]
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, or photo, or breakfast...and so on)[/small]
 
Hi

JJ said:
Doesn't run under Firefox
Neither under SeaMonkey, Galeon, Opera, Konqueror, Safari, Chrome, Epyphany, Midori, Arora... Or we can shorten the list and say that VBScript will run only in Explorer.

You can deduce the operating system from [tt]navigator.platform[/tt]. But note that scripts will see what the browser shows and users can instruct their browsers to show what they want.

Additionally see Operating System Information on BrowserSpy.dk by Henrik Gemal.

Feherke.
 
which of course then offers the user the opportunity of clicking on the wrong one!

Surely if your users have the nous to use Cisco VPN software, they'll know which OS they have?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
BillyRayPreachersSon said:
Surely if your users have the nous to use Cisco VPN software, they'll know which OS they have?

Yeah, right! Seriously, they struggle with making a VPN connection sometimes, more so now we've given them RSA tokens.

"I've forgotten my PIN...can you tell me what it is?"
or
"I've lost my token..."
or
"I've left my token at home. Can I still get in?"
or even
"Oh, I have to put the PIN first THEN the digits on the token!?"

JJ
[small][purple]Variables won't. Constants aren't[/purple]
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, or photo, or breakfast...and so on)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top