Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
New Developer
navan1983
Posts: 60
Registered: ‎01-16-2009

Browser Field - How to set appropriate User-Agent Header Property

We are using Browser Field to display our browser-based application, 
But we set the User-Agent property to '9000' 0r higher versions,
we are getting the message
"This page uses JavaScript and requires a JavaScript enabled browser.
 Your browser is not JavaScript enabled".

although we have the enabled the java script:

Code snippet for enabling java script:
// Enable javascript.
_renderingSession.getRenderingOptions().setProperty(RenderingOptions.CORE_OPTIONS_GUID, RenderingOptions.JAVASCRIPT_ENABLED, true);

As per the current scenario im BrowserField,
   
   a)  Browser Field Setting for 'User-Agent' Header property:
       
       When the user does not set the value in the browser Field                  
        and the 'User-Agent' goes as null

        Behaviour:
        the navigation does not work as the source for the navigation is not set.
     
   b) Browser Field Setting for 'User-Agent' Header property :
      When the User-Agent is set to 9000 or higher versions.                     

      Behaviour:
      It shows the message "This page uses JavaScript and requires a JavaScript enabled browser.
      Your browser is not JavaScript enabled".

   c) When the User-Agent is set to 8830.                                                   
        
      Behaviour:
      It works as expected.

We need to use the right user-agent property of the device as we are rendering stylesheets based on this property.

Thanks,
Navaneeth
Please use plain text.
New Developer
navan1983
Posts: 60
Registered: ‎01-16-2009

Re: Browser Field - How to set appropriate User-Agent Header Property

Environment details:
9000 simulator/9530 simulator

As we understand that the BrowserField in 9530 device is a lower version of the actual/default browser available in device, is it we cannot use the newly added broswer features that are available in the actual/default browser available in 9530?.

Thanks,
Navaneeth
Please use plain text.
Regular Contributor
hitesh171285
Posts: 90
Registered: ‎07-16-2010
My Carrier: bsnl

Re: Browser Field - How to set appropriate User-Agent Header Property

you have also get right user agent from http://www.showmyipaddress.eu/ you open its in device / simulator its return all information about your browser
Please use plain text.