3

I am using a class in which I am loading some text and images in browser field by using html tags.Now I want to change the text dynamically, how to refresh the browser field once after loading the screen.

If I use onclick tag on html to detect the click event then How to use java scripts to do some functionality for that click event. I am using document.getElementById to change the styles which I am using in my broserfield. How to reload the browser field or java scripts to view the updates.

How to use executeScript() to execute the javascript, simply added the string executeScript("javascript:(function() { " + value +"})()"); Value is the string where i used document.getElementById to get the elemenet id. Its not working.

Thanks.

Padma
  • 656
  • 3
  • 11
  • 30
  • can you post a simplified example of what you're doing? – Maksym Gontar Feb 02 '10 at 06:32
  • Hi Max, Thanks for your reply. Actually I could execute the java script now. What I am doing is, I have 3 customized managers in which having some buttons in top and bottom manager, and there is a browser field in the middle manager where I am adding some text, buttons and images. Now for example in the top manager I have a button, If I click that button it should change the font size of the text in the browser field for that I have used java script and its working fine. – Padma Feb 03 '10 at 05:11
  • But now my problem is I have one more button in the browser field, how to detect the click event from browser field and where to add the java script function, what are all the properties I supposed to set to detect the click event and to run the javascript function. "
    " \"Click " "
    "
    – Padma Feb 03 '10 at 05:12
  • Here encodedStrforZoom is the encoded string of image. Now If I click this button it should load a new screen in my blackberry app. Can you help me in this issue? Thanks in advance. – Padma Feb 03 '10 at 05:13
  • Hi! You could try to extend RenderingApplication and handle click there, see http://www.blackberry.com/developers/docs/4.0.2api/net/rim/device/api/browser/field/RenderingApplication.html#eventOccurred%28net.rim.device.api.browser.field.Event%29 and example http://docs.blackberry.com/en/developers/deliverables/11935/Display_content_in_BB_Browser_field_565587_11.jsp – Maksym Gontar Feb 03 '10 at 15:46

1 Answers1

0
BrowserField brawserField  = new BrowserField();
browserField.refresh();

use refresh method for refreshing the page.
iKushal
  • 2,689
  • 24
  • 20