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
Trusted Contributor
govind23
Posts: 112
Registered: ‎05-20-2011
My Device: 9800
My Carrier: Developer
Accepted Solution

could you please help me that,how to display java script in my browserfield?

i want to display a multiple markers in map.

here i am using javascript.

so plz help me where we can attach html file in my application

 

thank u inadvance

Please use plain text.
Developer
ibarrera
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Re: could you please help me that,how to display java script in my browserfield?

Please use plain text.
Trusted Contributor
govind23
Posts: 112
Registered: ‎05-20-2011
My Device: 9800
My Carrier: Developer

Re: could you please help me that,how to display java script in my browserfield?

thank u dear ,

i need to load local html file into my browser field.how?

Please use plain text.
Developer
krishnanmurari
Posts: 80
Registered: ‎06-06-2011
My Device: bold 9000
My Carrier: airtel

Re: could you please help me that,how to display java script in my browserfield?

HI,

 

Paste your html file into Res folder.

 

in browser field call it with this code

 

browserfield.requestContent("local:///yourhtmlfile");

 

Let me know if it works.

 

Regards

Krishnan,

Please use plain text.
Trusted Contributor
govind23
Posts: 112
Registered: ‎05-20-2011
My Device: 9800
My Carrier: Developer

Re: could you please help me that,how to display java script in my browserfield?

i am using this code

BrowserField browserField;
            
            BrowserFieldConfig config = new BrowserFieldConfig();  
            config.setProperty(BrowserFieldConfig.ALLOW_CS_XHR, Boolean.TRUE);
            browserField = new BrowserField(config);
            
            

            browserField.requestContent("map-projection-simple.html");
            add(browserField);

 

it goves an error like following screen9700-01.png

 

Please use plain text.
Developer
krishnanmurari
Posts: 80
Registered: ‎06-06-2011
My Device: bold 9000
My Carrier: airtel

Re: could you please help me that,how to display java script in my browserfield?

Hi,

 

BrowserFieldConfig config = new BrowserFieldConfig();  
            config.setProperty(BrowserFieldConfig.ALLOW_CS_XH

R, Boolean.TRUE);
            browserField = new BrowserField(config);
            
            

            browserField.requestContent("local:///map-projection-simple.html");
            add(browserField);



try the above code and let me know.

 

The only difference is adding this in request content local:/// .

 

Regards

Krishnan.

Please use plain text.
Trusted Contributor
govind23
Posts: 112
Registered: ‎05-20-2011
My Device: 9800
My Carrier: Developer

Re: could you please help me that,how to display java script in my browserfield?

its working dear

Please use plain text.
Developer
krishnanmurari
Posts: 80
Registered: ‎06-06-2011
My Device: bold 9000
My Carrier: airtel

Re: could you please help me that,how to display java script in my browserfield?

please select it as solved by clicking on the accepted as solution.

Please use plain text.