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

New Developer
Posts: 10
Registered: ‎12-23-2008
My Device: Not Specified

Javascript is not working

Hi All,

  I need to toggle visibility of control in the javascript which should work on the 4.2 versions also,

 display property and documet.getElementById is not working in the 4.2 version .


How do i get the value of the control?

Code is given below( which is not working in the 4.2 version)


 function DisplayCalender()
      (document.getElementById('cal').style.visibility == "visible") ? document.getElementById('cal').style.display = "hidden" :          document.getElementById('cal').style.display="visible" ;


Thanks in Adavance.


Posts: 395
Registered: ‎12-18-2008
My Device: BlackBerry Torch 9800
My Carrier: AT&T

Re: Javascript is not working

Prior to BlackBerry Devcie Software 4.6 the JavaScript DOM in the browser is Read-Only. Can't modify the content of a page in JavaScript.