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
Trusted Contributor
lathajagan
Posts: 118
Registered: ‎03-06-2013
My Device: Blackberry Z10
My Carrier: Airtel

Blank screen seen loading an iframe

hi,

there is a black screen seen before loading an iframe.

any idea how to fix it? the frame loads fine on Ios without any black screen between.

--------
- If a post contains the solution to the problem, please click "Accept as Solution"
- If a post contains helpful content, please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
Please use plain text.
Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: Blank screen seen loading an iframe

Did you whitelist the URL in your config.xml?
--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Please use plain text.
Trusted Contributor
lathajagan
Posts: 118
Registered: ‎03-06-2013
My Device: Blackberry Z10
My Carrier: Airtel

Re: Blank screen seen loading an iframe

i have whitelisted already, thats why there are no warnings like unsafe to open iframes, but there are some warnings like resource interpreted as script but transferred with mime type, some webserver needed to be updated it seems, could anyone guide me how to do that?

--------
- If a post contains the solution to the problem, please click "Accept as Solution"
- If a post contains helpful content, please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
Please use plain text.
Trusted Contributor
lathajagan
Posts: 118
Registered: ‎03-06-2013
My Device: Blackberry Z10
My Carrier: Airtel

Re: Blank screen seen loading an iframe

any suggestion about this?
--------
- If a post contains the solution to the problem, please click "Accept as Solution"
- If a post contains helpful content, please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
Please use plain text.
BlackBerry Development Advisor
anzor_b
Posts: 164
Registered: ‎09-24-2012
My Device: White BlackBerry 10
My Carrier: Bell

Re: Blank screen seen loading an iframe

Hi Lathajagan,

 

Don't worry about the warnings on "resource interpreted as script but transferred with mime type" - these are expected.

 

As for the white screen, I imagine the iframe is white until the contents begin to load? That's by design, iOS may have a different implementation, but there's ways around this. You can always wait for the iframe to load, before making it visible, as such:

 

//create iframe
var frame = document.createElement('iframe');
//hide and append to body
frame.style.visibility = "hidden";
document.body.appendChild(frame);
//set src to host address, this will begin loading content
frame.src="http://www.google.com";
//when content is loaded inside frame, show frame
frame.onload = function(){
   frame.style.visibility = "visible"
}

 You can even show a nice spinner and hide it inside frame.onload. This will be more elegant than showing the user how pieces of the page load.

 

Please use plain text.
Developer
kamal_nigam
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10
My Carrier: Orange

Re: Blank screen seen loading an iframe

try with the 

rim:loadingScreen element 

of the config. i knew it will not work on BB10 but you can find alternate of this. you can also try solution posted by 

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
Please use plain text.