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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

Regular Contributor
Posts: 74
Registered: ‎01-12-2012
My Device: Developer
My Carrier: Developer

Java + Web (enabled local java script loading)??

Hello, I was wondering If I could have my application be a Java App that contains a BrowserField.
but what I want from this is to have the Javascript Files locally in my app...

So for example I would call "www.mysite.com?localjavaScript=true" from my BrowserField.
And I would have mysite checking for  "localjavaScript=true", if this is found then I make importing java script
to local instead of having to download them.

example JavaScript suedocode :

<script src="Bb_Local_Directory/functions.js" type="text/javascript"></script>



<script src="www.mysite.com/libs/js/functions.js" type="text/javascript"></script>


I thought of this since the IFRAME in webworks was making problems (different unpredictable outcomes on devices..e.g: no scrolling etc)
And the other thing which was just making all mysite local in webworks WAS heavy (loading takes long time/ on first load and on page change) 

Thank you alll, And I just wanted to know if this Idea was viable !
All Help's appreciated.. 

Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Java + Web (enabled local java script loading)??

I'm not sure I completely understand your problem but I think you might be looking for a cache for your browserField.


This way, the first time you would request the js file it will come from the server and afterwards you would load it from local storage.


Also, you won't need to check/change the URL.


Check out this KB: