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.

inside custom component

Java Development

Reply
Developer
Posts: 367
Registered: ‎11-25-2009
My Device: Not Specified

Browser Field will not show Javascript

[ Edited ]

Hey everyone,

 

I have written a working browser field in my app. However, when I go to a generated OAuth Netflix login page, I recieve a message that I must activate Javascript.

 

Here is the link I am trying to get to work. It may be disabled when viewed, as it uses a timestamp:

 

https://api-user.netflix.com/oauth/login?application_name=Behr+Movie+Maker&oauth_callback=http://www.reslifescranton.net/oauth.php&oauth_consumer_key=5xpsty524wuc2pkkmz2ne3qf&oauth_token=6yeqk45z9f...

 

When I go to a website that tests to see if Javascript is enabled, however, it passes the test. I have the following lines of code in my app:

 

 

renderSession = RenderingSession.getNewInstance();
renderSession.getRenderingOptions().setProperty(RenderingOptions.CORE_OPTIONS_GUID, RenderingOptions.ENABLE_CSS, true);
renderSession.getRenderingOptions().setProperty(RenderingOptions.CORE_OPTIONS_GUID, RenderingOptions.CSS_MEDIA_TYPE, "screen");
renderSession.getRenderingOptions().setProperty(RenderingOptions.CORE_OPTIONS_GUID, RenderingOptions.JAVASCRIPT_ENABLED, true);

.
.
.

public void run(){
BrowserContent browserContent = renderSession.getBrowserContent(
                    conn, this, null);
}

 

Any ideas?

 

Thanks!

BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Browser Field will not show Javascript

What BlackBerry Smartphone model and BlackBerry device software version are you testing on?  You can find this under Options, About on the BlackBerry Smartphone.

 

Note that the original browser field does not have as extensive JavaScript support as the BlackBerry Browser.  AJAX is not supported in a browser field.

 

The BrowserField2 class added in BlackBerry device software version 5.0 does support AJAX, along with all other JavaScript supported in the 5.0 BlackBerry Browser. 

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Contributor
Posts: 20
Registered: ‎01-21-2011
My Device: Simulator 9000
My Carrier: dev

Re: Browser Field will not show Javascript

Does JDE 4.6.1 support javascript or not?

 

 

<div id='d'>doesn't work</div>
<script type="text/javascript">
document.getElementById('d').innerHTML = 'works!';
document.getElementById('boldStuff').innerHTML = 'Fred Flinstone';

</script>

 

 

This code doesn't work on bb simulator 9000, JDE 4.6.1

 

any ideas?

Highlighted
BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Browser Field will not show Javascript

You can refer to the HTML and JavaScript references in the link below to see what is supported.

 

http://docs.blackberry.com/en/developers/subcategories/?userType=21&category=BlackBerry+Browser

 

Note that the original browser field supports the equivalent features of the version 4.5.0 BlackBerry Browser.  When using BrowserField 2, it will support all features of the BlackBerry Device Software version you are running your application on.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker