0

I tried a simple javascript [Example: document.getElementById("mydiv").style.display = "none";] on a web page and tested it on BlackBerry 4.5 simulator browser and it worked.

Now I have an app (JRE 4.5 - Eclipse Plugin) with a BrowserField embedded in a browser and I access the same page in the BrowserField. I do have the following code added to my app

 myrenderingSession.getRenderingOptions().setProperty(RenderingOptions.CORE_OPTIONS_GUID,  RenderingOptions.JAVASCRIPT_ENABLED, true);

But the java script is not working. Do I need to add custom code to ensure java script executes? Anything in the Event.EVENT_EXECUTING_SCRIPT? Please help!

Nermeen
  • 15,883
  • 5
  • 59
  • 72
Dave
  • 4,038
  • 9
  • 45
  • 57

1 Answers1

0

I simply can confirm I have the same code on OS 4.5 to enable JS, and the page with JS works OK for me. However should also say I don't hide anything on the page via JS, so I can't confirm if the same JS to hide an element works for me.

Also - I don't handle Event.EVENT_EXECUTING_SCRIPT in any way. So I am sure the code you are using to enable JS is enough to expect JS support in your BrowserField.

Vit Khudenko
  • 28,288
  • 10
  • 63
  • 91
  • Thanks for your response. I don't think click events are firing in OS 4.5. For example: when you try to hide something when a button is clicked... and if you handle in javascript, the event simply won't fire from within a browserfield. – Dave Mar 29 '11 at 23:13