try another color scheme:


Go Back   TECH6.0 > Get Techie > Programming > HTML/CSS/JavaScript


Check Operating System and Redirect

This is a discussion on Check Operating System and Redirect within the HTML/CSS/JavaScript section, part of the Programming category; The code below checks for current OS and redirects accordingly to specific URL.. Code: <script language="JavaScript"> // This script sets ...

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 14-02-2008, 06:05 PM
webwizzy's Avatar

Administrator
 
Name: Vinayak
Join Date: Feb 2008
Location: India
Phone: Samsung Wave
Posts: 1,116
webwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nice
Send a message via Yahoo to webwizzy
Default Check Operating System and Redirect

The code below checks for current OS and redirects accordingly to specific URL..

Code:
<script language="JavaScript">
// This script sets OSName variable as follows:
// "Windows"    for all versions of Windows
// "MacOS"      for all versions of Macintosh OS
// "Linux"      for all versions of Linux
// "UNIX"       for all other UNIX flavors 
// "Unknown OS" indicates failure to detect the OS
if (navigator.appVersion.indexOf("Win")!=-1) window.location=("http://tech6.com");
if (navigator.appVersion.indexOf("Mac")!=-1) window.location=("http://tech6.com");
if (navigator.appVersion.indexOf("X11")!=-1) window.location=("http://tech6.com");
if (navigator.appVersion.indexOf("Linux")!=-1) window.location=("http://tech6.com");
</script>
__________________
Always TAG and SHARE your threads
Submit your site to TECH6 Directory
TECH6 on Facebook - Like Us

Would you like to Link To Us | Support TECH6 by going Premium
Know more about me at Vinayaks.com | Follow TECH6 at Twitter


Reply With Quote
  #2  
Old 20-05-2008, 10:01 AM
iBlake's Avatar

Techie
 
Name: Blake
Join Date: May 2008
Location: United States
Phone: Not in the list
Posts: 91
iBlake is on a distinguished road
Send a message via MSN to iBlake
Default

What would this be used for?
__________________
My iPhone is better than yours...........

I Am Back!
Reply With Quote
  #3  
Old 20-05-2008, 11:25 AM
webwizzy's Avatar

Administrator
 
Name: Vinayak
Join Date: Feb 2008
Location: India
Phone: Samsung Wave
Posts: 1,116
webwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nice
Send a message via Yahoo to webwizzy
Default

nice question !!

its too useful for me atleast.. I am currently using this script in the homepage of my mobile website (WAP).

The concept is like that if somebody tries to open my WAP website from PC (i.e. from OS like Windows, Linux etc.), he gets redirected to homepage of my site. BUT if he opens it from Nokia Symbian OS, he can view the site.. isn't that cool :001_cool:
__________________
Always TAG and SHARE your threads
Submit your site to TECH6 Directory
TECH6 on Facebook - Like Us

Would you like to Link To Us | Support TECH6 by going Premium
Know more about me at Vinayaks.com | Follow TECH6 at Twitter


Reply With Quote
Reply

Bookmarks


Thread Tools
Display Modes




All times are GMT +5.5. The time now is 01:43 AM.

Contact Us - Tech6.com - Link to Us - Advertise - Submit Site - Privacy Statement - TOS - Top