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
Developer
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10
My Carrier: Orange
Accepted Solution

Not getting document object by document.getElementById("FrameID").contentWindow in BB10

Hi,

 

I am getting window object with no properties by the following code.

 

document.getElementById("FrameID").contentWindow

 

but same code is working for Android and IPhone.

 

it is given undefined by document.getElementById("FrameID").contentWindow.document.

 

any help

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Not getting document object by document.getElementById("FrameID").contentWindow in BB10

It's WINDOW (not intentionally shouting - stressing - done it myself)

 

e.g.

 

window.frames['frameid']

 

Gets a bit complictaed from there on in

 

For example this mess give me a DIV in a frame ina an app called __ebook

 

var eb = $(frames['appframe'].document.getElementById('__ebook'));

 

From there I can mess with __ebook




Click the like button if you find my posts useful!
Developer
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10
My Carrier: Orange

Re: Not getting document object by document.getElementById("FrameID").contentWindow in BB10

i am unable to undestand. i am getting the same result by the code have written. i need to access the document of the iframe window.

 

 

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
Developer
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10
My Carrier: Orange

Re: Not getting document object by document.getElementById("FrameID").contentWindow in BB10

by mistake i have mark this as resolved. i am still searching solution of this problem.

 

any help from RIM team.

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
Developer
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10
My Carrier: Orange

Re: Not getting document object by document.getElementById("FrameID").contentWindow in BB10

i have tried websecurity disable to particular origin. now i am able to get contentWindow.
Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.