简体   繁体   中英

Displaying HTML content in a Field in blackberry

I am getting JSON response from the server..Inside that JSON string i am having HTML content which i need to display in a field..

Can anyone help..

You can just eval the JSON response, though for better security adding JSON parsing support is fairly simple, try the json2.js library. Then just use normal JS notation to extract your HTML string and insert it into your text field.

Note that:

  1. The Blackberry browser didn't support XMLHttpRequest until 4.6, for example the Curve 8310 does not support it.
  2. Javascript is not enabled by default on the Blackberry browser, if you have corporate setup you can enable it through an MDS policy rule
  3. If you've got the above two covered, be careful with Javascript libraries as you can easily exhaust the device memory simply interpreting them (with less than 300k of JS IMX)

有关如何使用V4.5.0 BrowserContent类在BlackBerry字段中显示HTML内容的更多详细信息,请参阅此问题

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM