Get a Jumpstart with our Sample Apps
Results 1 to 3 of 3

Thread: Here Is A Method To Fetch The Browser Type And Version ...

  1. #1
    "Certified" Alphaholic iRadiate's Avatar
    Real Name
    Stephen
    Join Date
    Jan 2011
    Location
    London, ON
    Posts
    1,392

    Default Here Is A Method To Fetch The Browser Type And Version ...

    I wanted to determine what browser the user is using because there can be problems with native mp4 video playback in browsers other than Internet Explorer.
    If I know what browser they are using, I can notify them that they cannot view the video if it's not IE. I still have this to sort out, but at least I can get the correct browser and version for now :)

    After researching this it turns out to be not as simple as it seems. However, I have found what I think to be a very simple solution and it seems to be working well.
    It uses a 3rd party javascript file called 'bowser.js' .. you can read about it here ... https://github.com/lancedikson/bowser
    I downloaded the entire package, but I think only the bowser.js file is needed for this. I've attached it here as well.

    Setup is simple:

    1. In the Web Projects Control Panel add the bowser.js file

    1. Javascript File.png

    2. In the UX Properties add bowser.js to the Javascript Linked Files

    2. Javascript Linked Files.png

    3. Call code to execute the javascript. In this test case I have the following code in the button OnClick event which puts the returned data into the control called Result.

    Code:
    {dialog.Object}.setValue('Result','Browser is '  + bowser.name + ' ' + bowser.version);

    Here is a video demonstrating the result: https://www.screencast.com/t/Rggr3ER9q
    The sample UX is also attached.
    Attached Files Attached Files
    Last edited by iRadiate; 12-29-2017 at 01:12 PM. Reason: grammar
    Alpha Anywhere v12.4.5.2 Build 4770-5018 IIS v8.5

  2. #2
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,379

    Default Re: Here Is A Method To Fetch The Browser Type And Version ...

    Thanks for this - this is a very important thing to now as it allows us to avoid differences in browser issues we bump into from time-to-time. Well done.
    Insanity: doing the same thing over and over again and expecting different results.
    Albert Einstein, (attributed)
    US (German-born) physicist (1879 - 1955)

  3. #3
    Member
    Real Name
    Michael Cornford
    Join Date
    Oct 2011
    Location
    East Sussex, UK
    Posts
    846

    Default Re: Here Is A Method To Fetch The Browser Type And Version ...

    Thanks.

Similar Threads

  1. Browser version requirements
    By noviceuser in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 12-26-2013, 08:54 PM
  2. Detecting user browser type
    By mikeallenbrown in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 10-17-2013, 03:17 PM
  3. ORA-24374: define not done before fetch or execute and fetch
    By jrturner0112 in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 12-19-2012, 01:28 PM
  4. incorrect data type, method not found errors
    By W. Horton in forum Alpha Five Version 4
    Replies: 3
    Last Post: 10-29-2002, 05:49 PM
  5. return type of a method
    By Rick LaCount in forum Alpha Five Version 4
    Replies: 8
    Last Post: 10-19-2000, 07:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •