.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> JavaScript/VBScript >> Post New Question Subscribe to Interview Questions

How to detect the operating system on the client machine in JavaScript?

Posted By :Ghanashyam Nayak     Posted Date :September 28, 2010    Points :10   Category :JavaScript/VBScript 
The navigator.appVersion string should be used to find the name of the operating system on the client machine. The following code snippet returns the appropriate Operating systems.

var OSName="Unknown OS";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";

You can also find related Interview Question to How to detect the operating system on the client machine in JavaScript?  below: 

Internetworking Operating System(IOS) is used by which networking Device?

  
Internetworking Operating System(IOS) is used by Routers. (More...)

Which function is used to know the current active user within the host Operating System?

  
SYSTEM_USER function is used to know the current active user within the host Operating System.

SELECT SYSTEM_USER

-->Abhisek (More...)

What is the difference between Client side JavaScript and Server side JavaScript?

  
Client side java script comprises the basic language and predefined objects which are relevant to running java script in a browser. The client side java script is embedded directly by in the HTML pages. This script is interpreted by the browser at run time.



Server side java script also resembles like client side java script. It has relevant java script which is to run in a server. The server side java scripts are deployed only after compilation. (More...)

Which command using Query Analyzer will give you the version of SQL server and operating system?

  
SELECT SERVERPROPERTY ('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition'). (More...)

Which command using Query Analyzer will give you the version of SQL server and operating system?

  
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY
('edition') (More...)

How to get the IP address of the Client System ?

  
By using following code in the Code-Behind file we can get the IP adderss of a client system on which the application is running.

string MyClientAddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];

Response.Write("IP Address of my client system is ---"+MyClientAddress); (More...)

What is type system unification?

  
The goal of type system unification is to bridge the gap between value types and reference types that exists in most languages. For example, a Stack class can provide Push and Pop methods that take and return object values.

public class Stack
{
public object Pop() {...}
public void Push(object o) {...}
}
Because C# has a unified type system, the Stack class can be used with elements of any type, including value types like int. (More...)

What is the common type system (CTS)?

  
The common type system is a rich type system, built into the Common Language Runtime, that supports the types and operations found in most programming languages. The common type system supports the complete implementation of a wide range of programming languages. (More...)

What is a Database system?

  
The database and DBMS software together is called as Database system. (More...)

Disadvantage in File Processing System?

  
1.Data redundancy & inconsistency.
2.Difficult in accessing data.
3.Data isolation.
4.Data integrity.
5.Concurrent access is not possible.
6.Security Problems. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend