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

Web and WebWorks Development

Reply
Highlighted
New Contributor
Posts: 9
Registered: ‎10-19-2010
My Device: 9700

BB browser not changing the DOM on-the-fly

Hi,

 

I am trying to insert the SCRIPT dynamically in the frame.

This script is meant for replacing some specific tags by simple <a> tags.

 

For inserting the script dynamically I am using appendChild() method as below

 

 

scriptText+="Script to replace the tag";

var newScript = document.createElement('script');
newScript.type='text/javascript';
newScript.text = scriptText;


document.getElementById('f').contentWindow.document.getElementsByTagName('head')[0].appendChild(newScript);

But, I think the appendChild() method is not working in the BlackBerry browser, though the script does run on other browsers like FF and IE.

Please guide me with proper reason/solution.

Simulator being used :: 9550 verizon
Thanks in advance.