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

Web and WebWorks Development

Reply
New Developer
Posts: 19
Registered: ‎01-04-2009
My Device: Not Specified

BrowserContentManager supported DOM API

I am loading up HTML pages using the BrowserContentManager much like the browser sample that ships with the JDE but am finding that a lot of the DOM methods do not work. For example,

 

window.onload = function() { document.getElementById('foo').innerHTML = 'bar';};

has no effect on the contents of the DOM node with id foo. If I do something with form fields it seems to work though - but is pretty darn ugly:

 

document.forms[0].elements['foo'].value = 'bar'; 

I have enabled JavaScript in the RenderingOptions and combed through the various RenderingOptions to see if there is something that I am missing but I don't think so.

 

Incidentally, it also seems like the CSS support is not as described in the BlackBerry Browser CSS Reference since setting the border to 1px solid white on an input has no effect. 

 

I am running this in the BB 9000 simulator.

 

If there are these limitations to the BrowserContentManager is there some other way to control the rendering of a web page but still have access to all the regular BlackBerry Browser V4.6 APIs? 

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

Re: BrowserContentManager supported DOM API

The rendering engine in a browser field is different than what is used in the version 4.6.0+ BlackBerry Browser.  The engine in the previous (pre 4.6.0) version of the BlackBerry Browser is used.  Therefore it does not support the new JavaScript, AJAX and CSS features added in the version 4.6.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
New Developer
Posts: 19
Registered: ‎01-04-2009
My Device: Not Specified

Re: BrowserContentManager supported DOM API

Thanks for the verification on that MSohm.

 

And my follow up is of course then is there any way to use the 4.6 Browser in a way that I could communicate between it and a Java program through JavaScript in the browser? I can achieve this with the BrowserContentManager by passing back and forth custom formatted cookies.

New Developer
Posts: 19
Registered: ‎01-04-2009
My Device: Not Specified

Re: BrowserContentManager supported DOM API

So MSohm I assume there is no way to create an app with an embedded browser that allows Ajax type functionality then?

 

Thanks!

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

Re: BrowserContentManager supported DOM API

Currently there is no way for a page opened in the BlackBerry Browser to communicate with a Java application on the BlackBerry handheld.  Since AJAX is not supported in a browser field, the BlackBerry API set does not include any support for displaying AJAX web pages within a third party application.
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
New Member
Posts: 1
Registered: ‎07-29-2010
My Device: Not Specified

Re: BrowserContentManager supported DOM API

Hi,

 

Its been over a year now since last activity on this post.

I need to get ajax working in my application so that i can provide the user with predictive text keyword suggestion from the server.

 

 

N Yes I am using the BrowserContentManager  in my applicatrion. There must be some workaround for this.

N Yes BrowserField2 cant be option for me as I the application will be loaded in older model like the 8320 (OS 4.5)

Help ....

Thanks!!