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

Posts: 43
Registered: ‎02-05-2010
My Device: 8900
My Carrier: don't know

iframe contentWindow problem

Hello everyone,


my problem is that the function "document.getElementById('ifr').contentWindow.location.href "

did not function on the blackberry. I want to get the url of the website that is opened in the iframe. But I get nothing.


Hope someone has an idea.




Regular Contributor
Posts: 83
Registered: ‎04-29-2011
My Device: 9300 Curve
My Carrier: TIM

Re: iframe contentWindow problem

[ Edited ]

Hello guys, i know that the topic is a little old.. but i'm getting this error too...

BlackBerry OS5 - Curve 9300

i'm using the code:

return views[i-1].firstChild.contentWindow;

the firstChild is defined (and it's a iframe) but when i call the contentWindow of the iframe, it did not function...

Anyone has an idea?


edit: the url of the iframe it's localhost too (just another .html).

Márcio Saeger - Software Engineer, Softwell Solutions
Posts: 17
Registered: ‎04-19-2012
My Device: Torch
My Carrier: Telenor Denmark

Re: iframe contentWindow problem

It seems people keep getting same issues all over again. 


have you found a solution to this problem?

Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10
My Carrier: Orange

Re: iframe contentWindow problem

i know this thread for BB Java Smarphone but i am getting same issue in BB10 device.


some one say we can ingnore this by enabling the web security. but  i fell we can't enable this on production code.



any help



Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.