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
New Developer
Posts: 1
Registered: ‎07-21-2008
My Device: Not Specified

Blackberry BrowserField invoking javascript programmatically

Hi,

    Is it possible to invoke the java script programmatically on browser field?

 

Thanks,

Ravi.

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

Re: Blackberry BrowserField invoking javascript programmatically

You are not able to invoke a JavaScript method found on the page.  But you can enable/disable JavaScript support when creating a browserfield.  Please see the sample found in the BlackBerry JDE for an example.
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
Highlighted
New Developer
New Developer
Posts: 6
Registered: ‎12-15-2008
My Device: Not Specified

Re: Blackberry BrowserField invoking javascript programmatically

Hi,

 

i enabled the javascript, but still javascript is not getting executed. 

This is what i did..

_renderingSession.getRenderingOptions().setProperty(RenderingOptions.CORE_OPTIONS_GUID, RenderingOptions.JAVASCRIPT_ENABLED, true);                       
         is it right? or anything else is required?

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

Re: Blackberry BrowserField invoking javascript programmatically

Please verify if JavaScript is not being run at all by adding a simple alert call.  This would test the browser field versus the script you have on your page.  It could be that you are using some script that is not supported and therefore not being run within the browser field..
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
New Developer
Posts: 6
Registered: ‎12-15-2008
My Device: Not Specified

Re: Blackberry BrowserField invoking javascript programmatically

I'm sorry.. it worked. I was trying to click exactly on the button, but wasn't getting clicked, but when i tried slightly clicking upper part of the button , rather outside of it's area! It clicked and worked fine.

 

Thanks for the reply..