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: 22
Registered: ‎08-28-2008
My Device: Not Specified

innerHTML element attribute is not supported in the Blackberry browser.

It appears that the javascript DOM element attribute innerHTML is not supported on my 8310.  I understand that this is not officially part of the W3C spec, but *every* other browser out there supports this Microsoftism.

 

Is there support for this on the Blackberry platform?  If not is there a work-around available?

 

Thanks for any help,

 

Matt

 

This page works correctly on:

Firefox, IE, Opera, Safari, iPhone

This page does not work on Windows Moblie phones or the Blackberry.  There is a workaround under Windows.

 

8310: v4.2.2.170

 

http://iwon.com.au/innerHTMLtest.html

 

 

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

Re: innerHTML element attribute is not supported in the Blackberry browser.

This is supported in version 4.6.0+ of the BlackBerry Browser.  You can try it out using the BlackBerry Simulator included with the beta version of the 4.6.0 BlackBerry JDE found here:

 

http://na.blackberry.com/eng/developers/devbeta.jsp#tab_tab_jde

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
Guru I
Posts: 19,007
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: innerHTML element attribute is not supported in the Blackberry browser.


dvdmatt wrote:

It appears that the javascript DOM element attribute innerHTML is not supported on my 8310.  I understand that this is not officially part of the W3C spec, but *every* other browser out there supports this Microsoftism. 


Hello,

 

.innerHTML is a read/write attribute that is a superset of the DOMElement class in Javascript. Though it may seem it's Javascript DOM, it is not.

 

  • .innerHTML is not part of DOM (not even in a draft)
  • .innerHTML is not part of ECMAscript (not even in a draft)
  • .innerHTML is part of the HTML 5.0 working draft : http://www.w3.org/TR/html5/dom.html#innerhtml (seeing how fast W3 goes, maybe HTML 5.0 will become a recommendation by 2010?), which is saying that in a distant future itmay be integrated in DOM Level 0.

 

That being said, a german student has created a set of Javascript functions that do .innerHTML with legit DOM fonctions(I don't know what it's worth)http://innerdom.sourceforge.net/

 




The search box on top-right of this page is your true friend, and the public Knowledge Base too:
New Developer
Posts: 22
Registered: ‎08-28-2008
My Device: Not Specified

Re: innerHTML element attribute is not supported in the Blackberry browser.

Nice.

 

Thanks Mark, Xandrex.

 

I'll see if the current innerHTML implementation will work for our current code.  If not we would need access to the 4.6 browser under the 4.6OS.

 

Matt

 

New Developer
Posts: 22
Registered: ‎08-28-2008
My Device: Not Specified

Re: innerHTML element attribute is not supported in the Blackberry browser.

That should have been 'under the 4.2 OS'.

 

Matt

Guru I
Posts: 19,007
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: innerHTML element attribute is not supported in the Blackberry browser.

hello dvdmatt,

in the top corner of each of your message, you have en "options" menu that allows you to edit your message after you have posted it.

There will be no 4.6 browser on 4.2 OS. The browser is part of the OS. You can pray fot a 4.2.3 but I am not sure Blackberry maintains old branches.
there was 4.2, then 4.2.2, but when 4.3 was released, the devels for 4.2.x stopped (I hope I'm wrong though)



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
New Developer
Posts: 22
Registered: ‎08-28-2008
My Device: Not Specified

Re: innerHTML element attribute is not supported in the Blackberry browser.

Hi Xandrex,

 

Unfortunately the german student's work depends on the functioning of the createTextNode() call which is broken in 4.2.

 

Matt 

Guru I
Posts: 19,007
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: innerHTML element attribute is not supported in the Blackberry browser.

You can wait for your carrier to release the 4.3 or 4.5, and install it on your Blackberry.
For instance, Vodafone Germany has released 4.5.



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
New Developer
Posts: 22
Registered: ‎08-28-2008
My Device: Not Specified

Re: innerHTML element attribute is not supported in the Blackberry browser.

Thanks again Xandrex for your help!

 

Unfortunately upgrading the OS is simply not an option for this product.  It is to be installed on over 50,000 phones and can not have a special Blackberry executable, nor can it require a user to upgrade the OS on their phone.  I would like it to be supported on the Blackberry, but unless a solution is found my management is considering 'solving' the problem by banning Blackberrys on the corporate network and posting a large warning on the website that Blackberrys are not welcome.  Not a solution I particularly espouse.

 

Blackberry support, what is the procedure to request a patch to fix the createTextNode() error in the 4.2 browser?


Matt

 

Guru I
Posts: 19,007
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: innerHTML element attribute is not supported in the Blackberry browser.

50000 ? so you are using BES. You can push the Opera Mini application from the BES without any action from the owner of the Blackberry.

anyways, you should try and convince your management not to use innerhtml, that's just nonsense to use a function that is not even guaranteed to be supported in 2 years.

for the Blackberry support, you should contact them directly : pay and open a ticket.
I believe they won't do it, or charge for a price that is higher than you buying 50'000 new Blackberries.



The search box on top-right of this page is your true friend, and the public Knowledge Base too: