Jquery/JavaScript to get current browser's name and its version

Hi,
I using sharepoint 2010, 
Is it possible using Jquery/JavaScript to get current browser's name and its version.
when my sharepoint site home page opens i need to display a popup msg of current browser name and its version.
can anyone help me on this.
With Regards,
RK

Please use the below code snippet:
And here is the source code that performed the browser detection:
var nVer = navigator.appVersion;
var nAgt = navigator.userAgent;
var browserName = navigator.appName;
var fullVersion = ''+parseFloat(navigator.appVersion);
var majorVersion = parseInt(navigator.appVersion,10);
var nameOffset,verOffset,ix;
// In Opera 15+, the true version is after "OPR/"
if ((verOffset=nAgt.indexOf("OPR/"))!=-1) {
browserName = "Opera";
fullVersion = nAgt.substring(verOffset+4);
// In older Opera, the true version is after "Opera" or after "Version"
else if ((verOffset=nAgt.indexOf("Opera"))!=-1) {
browserName = "Opera";
fullVersion = nAgt.substring(verOffset+6);
if ((verOffset=nAgt.indexOf("Version"))!=-1)
fullVersion = nAgt.substring(verOffset+8);
// In MSIE, the true version is after "MSIE" in userAgent
else if ((verOffset=nAgt.indexOf("MSIE"))!=-1) {
browserName = "Microsoft Internet Explorer";
fullVersion = nAgt.substring(verOffset+5);
// In Chrome, the true version is after "Chrome"
else if ((verOffset=nAgt.indexOf("Chrome"))!=-1) {
browserName = "Chrome";
fullVersion = nAgt.substring(verOffset+7);
// In Safari, the true version is after "Safari" or after "Version"
else if ((verOffset=nAgt.indexOf("Safari"))!=-1) {
browserName = "Safari";
fullVersion = nAgt.substring(verOffset+7);
if ((verOffset=nAgt.indexOf("Version"))!=-1)
fullVersion = nAgt.substring(verOffset+8);
// In Firefox, the true version is after "Firefox"
else if ((verOffset=nAgt.indexOf("Firefox"))!=-1) {
browserName = "Firefox";
fullVersion = nAgt.substring(verOffset+8);
// In most other browsers, "name/version" is at the end of userAgent
else if ( (nameOffset=nAgt.lastIndexOf(' ')+1) <
(verOffset=nAgt.lastIndexOf('/')) )
browserName = nAgt.substring(nameOffset,verOffset);
fullVersion = nAgt.substring(verOffset+1);
if (browserName.toLowerCase()==browserName.toUpperCase()) {
browserName = navigator.appName;
// trim the fullVersion string at semicolon/space if present
if ((ix=fullVersion.indexOf(";"))!=-1)
fullVersion=fullVersion.substring(0,ix);
if ((ix=fullVersion.indexOf(" "))!=-1)
fullVersion=fullVersion.substring(0,ix);
majorVersion = parseInt(''+fullVersion,10);
if (isNaN(majorVersion)) {
fullVersion = ''+parseFloat(navigator.appVersion);
majorVersion = parseInt(navigator.appVersion,10);
document.write(''
+'Browser name = '+browserName+'<br>'
+'Full version = '+fullVersion+'<br>'
+'Major version = '+majorVersion+'<br>'
+'navigator.appName = '+navigator.appName+'<br>'
+'navigator.userAgent = '+navigator.userAgent+'<br>'
VARIABLES
DESCRIPTION
navigator.appCodeName 
The code name of the browser 
(e.g. Mozilla) 
navigator.appName
The name of the browser 
(e.g. Netscape or Microsoft Internet Explorer) 
navigator.appVersion
The browser version (e.g. 3.0 or 4.0) 
navigator.userAgent
The header information for the browser. 
(e.g. Mozilla/4.0) 
navigator.platform
The users operating system
(e.g. WIN32)
http://www.w3schools.com/js/js_window_navigator.asp
Click on Propose as Answer if the solutions works for you.

Similar Messages

  • How to get Current Background Job name and Job Count programmically?

    Hi all,
            I have a requirement wherein I need to get the Current Background Job name and Job Count in the program and store it in a custom table. In other words, whenever I schedule a particular program ( This is a Std program) in background, I need to update this table with the Job Name and Job Count. This will be used by another program later to read the Job Information from table TBTCO. TBTCO has key fields Job Name and Job ID. The sheduled program will be a SAP standard program and I'll be writing the logic to get the info in an Implicit Enhancement Spot.
    Is there anyway I can do this? Any FM to get this information?
    Thanks,
    Mahesh.

    Hey Adrian,
                             Thanks a lot. This is what exactly i was looking for. Appreciate it.
    Mahesh.

  • Get Target table name and its count

    Hi Experts,
    I have created a Procedure where I want to get the Target table name and its count of the previous Interface in a Package and insert these values into the Audit table.
    I am able to get the number of Inserts in previous step using getPrevStepLog() API, but I also want the Target table name and its total count of the previous Interface. Is there any generic way or code to bring these Information without hardcoding the table name. Kindly help to sort this issue.Thanks!
    Warm Regards,
    VBV

    Hi VBV,
    Please follow the below steps to audit ur execution.
    Please note i coded in such a way that u can use ur existing procedure to capture the table name no need to query ur repository as its not advisable to query the repository as Oracle may change the structure in future which i personally feel right.
    I created a Audit table with the below structure.
    CREATE TABLE AUDIT_TABLE
    INSERT_COUNT VARCHAR2(100 BYTE),
    TABLE_NAME VARCHAR2(4000 BYTE)
    Step 1 :
    This step needs to be added in ur existing IKM after Commit step where i am using API to capture the target table name.
    Step Name: Get Table Name
    Command On Source
    Technology: Oracle
    Schema: Any Oracle related Schema
    Command:
    SELECT '<%=odiRef.getTargetTable("RES_NAME")%>' AS TGT_NAME FROM DUAL
    Command On Target
    Technology: Jython
    Command:
    TargetTable='#TGT_NAME'
    Step 2:
    In ur existing procedure add the below or add a new procedure.
    Step Name: Audit Log
    Command on Source
    Technology : Oracle
    Schema: Whichever schema holds the audit table
    Command on Target
    Technology : Jython
    Command:
    import java.sql as sql
    import java.lang as lang
    myCon =odiRef.getJDBCConnection("SRC")
    MyStmt=myCon.createStatement()
    myRs = MyStmt.executeQuery("INSERT INTO ODITGT.AUDIT_TABLE (INSERT_COUNT,TABLE_NAME) VALUES (<%=odiRef.getPrevStepLog("INSERT_COUNT")%>,'"+TargetTable+"')")
    Thats it.
    OTN doesnt allow me to put + sign in front of any word ( its assume its a Italic) so please add + (plus) sign before and after TargetTable in the above script.
    This way u can capture the table name, insert count in to ur audit table.
    Please note u need to call this Procedure after the successful completion of the interface in a package and make sure u selected the right IKM which capture the table name as in Step 1.
    I tested in my local and its working fine. Let me know if u find any difficulties in implementation.
    Thanks,
    Guru

  • Get current SQL instance name with PowerShell

    Hi all,
    I'm preparing SQL agent job that will backup all jobs on SQL server. Main step is PoswerShell script. I want that job to be universal for all servers. The first parameter that I need to send to script is instancename.
    I want to use variable as InctanceName parameter. So, when I run this job on particular server this variable must get current SQL instance name.
    I can use $env:computername for default instances but I cannot use it with named instances or with clustered instances. Some solutions like using 'HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL' keys won't work because of number of
    instanses can be running on one machine.
    How to get only current SQL instance name?

    Hi, 
    Thank you for your answers.
    I found this solution:
    $serverInstance = "$(ESCAPE_DQUOTE(SRVR))"
    Working perfect.

  • To get current data block name

    Hi;
    I have 2 data blocks on my form and I want to get current data block name on my form. How can I do this???
    Thank you

    Like Rosario said, use the :SYSTEM.CURSOR_BLOCK.
    you can also use :SYSTEM.TRIGGER_BLOCK in triggers to find which block was responsible of the firing event of a trigger.
    Do not use :SYSTEM.CURRENT_% variables in Forms 9i and above, those are only there for compatibility reasons.
    You can also check the online help for more details on :SYSTEM.% system variables.
    Tony

  • How do I get Calendar to suggest name and address from Contacts on my iPhone 5 in iOS 8?

    How do I get Calendar to suggest name and address from Contacts on my iPhone 5 in iOS 8?

    Restore it from your backup.

  • How to get the document type, name and revision from the search page cv04n

    Hello,
    After performing cv04n and getting a list of documents satisfying the search criteria, how can I then get the document type, name and revision of the selected document using ABAP?
    Thanks

    HI,
    IN table DRAW... u have Document type, Version and document number.
    In Table DRAT also u get Document Type, Version, Number and Description of Doucment.
    Regards
    SAB

  • If i pass the SEGMENT NAME and its SDATA can i get the all IDOCs?

    Hello
    If i pass the SEGMENT NAME and its SDATA can i get the all IDOCs of these values(sdata) holding? is tehre any standard SAP function module?
    Moderator message: please search for information and try yourself before asking.
    Edited by: Thomas Zloch on Aug 23, 2011 2:44 PM

    Hi Uwe,
    Thanks very much for your reply, now I have another problem .
    Only the authrotiy field in the authority object is not '*' shall I check for the authority, how can I realize this?
    thanks very much for your help.
    Lament

  • I have an early MiniMac with OS X 10.4.11.  Can I get a free OS upgrade and which version should I choose?  Do I just download and over ride the current OS system or what?

    I have an early MiniMac with OS X 10.4.11.  Can I get a free OS upgrade and which version should I choose?  Do I just download and over ride the current OS system or what?

    First what model Mini do you have? That will determine how high y can go.
    How to identify Mac mini models
    In any event you will have to pay

  • [svn:fx-trunk] 9180: When another popup is going away as the alert is going up, the Alert can get validated inside of addPopUp and its centering logic never got the event it expected .

    Revision: 9180
    Author:   [email protected]
    Date:     2009-08-07 15:11:43 -0700 (Fri, 07 Aug 2009)
    Log Message:
    When another popup is going away as the alert is going up, the Alert can get validated inside of addPopUp and its centering logic never got the event it expected.
    add the event listener earlier so it is ready if we get validated inside addPopUp
    QE Notes: versioning/baselines/mp_alert_mask_compatible.png needs updating.  I think the current baseline is incorrect.
    Doc Notes: None
    Bugs: SDK-22819
    Reviewer: darrell
    tests: checkintests mustella/components/alert
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22819
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.as

    Hi or2tx2002, 
    We're really sorry to learn of all the equipment issues you've experienced in the last year. In order to discuss your replacement options, I ask that you please PM me with your wireless number, a contact number and a good time to reach you. I will be happy to reach out to you and bring resolution to this matter. 
    Thank you and I look forward to hearing from you soon. Make it a great day! 

  • What is the list of possible OS names and OS versions, returned by OS name property?

    My application is supposed to work a little bit differently running on different versions of Windows. For now the problem is that the possible strings returned by OS name and OS version (APP reference properties) are not specified in LV help. I've tested it for Win2k and got back "Windows NT" as a name and "5.0" as a version number. What should I expect for Windows ME, Windows 95, Windows XP?
    Appreciate your responses, thanks for everybody who may have a clue of what it should be.

    System
    Version9X
    VersionNT
    WindowsBuild
    ServicePackLevel
    Windows 95 (Gold)
    400
    950
    Windows 95 + OSR
    400
    Windows 95 + OSR2
    400
    Windows 95 + OSR2.5
    400
    1111
    Windows 98 (Gold)
    410
    1998
    Windows 98 Second Edition
    410
    2222
    Windows Me
    490
    3000.1
    Windows NT 4.0 (Gold)
    400
    1381
    Windows NT 4.0 + Service Pack 1
    400
    1381
    1
    Windows NT 4.0 + Service Pack 2
    400
    1381
    2
    Windows NT 4.0 + Service Pack 3
    400
    1381
    3
    Windows NT 4.0 + Service Pack 4
    400
    1381
    4
    Windows NT 4.0 + Service Pack 5
    400
    1381
    5
    Windows NT 4.0 + Service Pack 6
    400
    1381
    6
    Windows 2000
    500
    2195
    Windows 2000 + Service Pack 1
    500
    2195
    1
    Windows XP
    501
    2600
    Windows XP + Service Pack 1
    501
    2600
    1
    Windows Server 2003 family
    502
    Greater than 2600
    I got List, but i cant sure LabVIEW is the same as above.
    http://www.vitst.com
    Virry Test & Control
    LabVIEW Certified Developer

  • Get current FORM-Routine Name

    Hi,
    during runtime i want to know the current form-routine-name to write it in a variable and put it in an itab. The background-idea is to print out all procedures that have been executed after running the program.
    Any hints, suggestions how to get this done?
    Thanks in advance
    Gunther

    Hi, Gunther,
    The only way to do this is to read the ABAP Call Stack in an internal table.
    Code:
    TYPES: BEGIN OF t_s_abap_callstack,
             mainprogram LIKE sy-repid,
             include LIKE sy-repid,
             line TYPE i,
             eventtype LIKE abdbg-leventtype,
             event LIKE abdbg-levent,
             flag_system,
           END OF t_s_abap_callstack.
    variable for ABAP callstack
    DATA: g_callstack TYPE STANDARD TABLE OF t_s_abap_callstack,
          g_callstack_wa TYPE t_s_abap_callstack.
    call 'ABAP_CALLSTACK' id 'DEPTH' field 99
                            id 'CALLSTACK' field g_callstack.
    g_callstack now contains the program and routine names called, in sequence. 
    Pls be careful in using this C Call; in particular, usage in a Productive environment should only be envisaged with the utmost caution.
    Philippe

  • Get current field's name

    I can't remember, is there a way for a field to get it's own name into a variable?
    for example.
    var me = getField(currentField);
    Is this doable?

    What is your intention? Do you need the field name, or are you trying to get a reference to the field itself? Under the correct context, you could just use event.target to reference the field. I'm assuming you are using this in a field event.

  • Getting both sender's name and e-mail adress

    How can I extract information about both the sender's name and e-mail adress? If I, for example, have an email containing the tag "From: John Doe <[email protected]>" and I use the getFrom() method in MimeMessage, I only get the first part (the name). If i try the getSender() method I get null as a result. And if i use getReplyTo() I also get only the name and not the email address. How do I get the email adress too?
    Best Regards,
    tjosan

    Retrieve and assign the From address to an Address[] object, typecast it to InternetAddress and use the getAddress() - (for email address) or getPersonal() - (for Name) methods on it
    Address[] a;
    a = message.getRecipients(Message.RecipientType.FROM);
    for(int i = 0; i < a.lenght; i++)
    String name = ((InternetAddress)a).getPersonal();
    String email = ((InternetAddress)a[i]).getAddress();

  • How to get back my workspace name and account?

    I cannot recall workspace name and user account information when loging in to the apex.How to find back these information? Please give your hand. thanks.

    1. Please tell us your first name.
    2. Go to the login page of the Application Express host where you created an account. See the Tasks region in the upper-right section of the page. Click the Find My Workspace link. Complete and submit the form. Wait for an email. If you don't know the email address you used, telephone or email the administrator of the Application Express service where you created the account.
    Scott

Maybe you are looking for

  • One series in a graph - different colors for different bars.

    Hi, I have a graph with one series in it. It produces 7 bars within that graph. I need the first 3 bars (from the left) to be green, and the other 4 bars to be blue. All 7 bars are produced from one query/data model. This is in an RTF template within

  • I need help turning on my iPhone

    i need help turning on my iPhone

  • No Subscriptions for copy of R/3 site creation in SMOEAC

    Hi, I have a R/3 site in SMOEAC for replicate customers and B2C processes to ECC. And subscriptions for this Site are : BUPA_MAIN, BUPA_REL and BUS_TRANS_MSG. But now I need to transfer BUPA_MAIN and BUPA_REL from another RFC connection to ECC. I cop

  • Best way to create attractive subtitles

    I'm not talking about closed captioning, but rather, attractive burned in subtitles in Premiere.  I need the ability to quickly change the style of all titles at once (e.g. font, color, size), so I think that rules out the title tool. I followed one

  • Auto complete of urls missing in safari 6.0

    am a newbie to mac and slowly learnin on... my safari got updated recently. in the previous versions just entering the name and pressing enter would automatically take me to the site i wanted. Eg:  hotmail + enter would take me to www.hotmail.com ...