/    Sign up×
Community /Pin to ProfileBookmark

javascript for detecting System then redirecting to sys-specific page

I post video on the web for personal sites and for clients. Still to date there is no viable cross platform video codec, Windows STILL does not support Flash, and Mac doesn’t support WHM.

I use Fancybox to display video, using the iframe function in fancybox to get a page with the video embedded.

I would like a javascript detector I can install in the head of the page that is loaded into the iframe which will detect the system of the user’s computer, for inst: if Windows then do nothing, if Mac then redirect to a different page to load, so that I can load Flash only for Mac machines, and WHM only for Windows machines. Is this possible, and what would that javascript be?

If not poss. for iframe loading (don’t know why it wouldn’t be), then I’d like a script to do that function for a normal html page.
thanks
JSC

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@mityaMar 13.2011 — navigator.appVersion returns system info.
Copy linkTweet thisAlerts:
@jami1955authorMar 13.2011 — Yes it does. It doesn't do anything about redirecting tho, would I need to visit a freelance website to find that?

(I would like a javascript detector I can install in the head of the page that is loaded into the iframe which will detect the system of the user's computer, for inst: if Windows then do nothing, if Mac then redirect to a different page to load, so that I can load Flash only for Mac machines, and WHM only for Windows machines. . .)
Copy linkTweet thisAlerts:
@mityaMar 13.2011 — Something like:

[CODE]if (navigator.appVersion.indexOf('Macintosh') != -1) location.href = 'somepage.html';[/CODE]
Copy linkTweet thisAlerts:
@jami1955authorMar 13.2011 — thanks for that, cheers.
×

Success!

Help @jami1955 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...