Languages

Menu
Sites
Language
iFrames in webapps

I have an iFrame in my app to show a small image pulled from a url. For some reason the iframe content launches the browser instead of displaying in line in  hte app. Has anyone else had problems with iframes on tizen?

 

Below is the config file. 

<?xml version="1.0" encoding="UTF-8"?>

<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets"

id="http://neatofun.com/Massager" version="1.0.0" viewmodes="maximized">

<tizen:application id="V6AXWw.coolapp" package="V6mWw"

required_version="2.1" />

<content src="index.html" />

<content src="about.html" />

<icon src="icon.png" />

<name>Cool app</name>

<tizen:privilege name="http://tizen.org/privilege/application.launch" />

<tizen:privilege name="http://tizen.org/privilege/network.connection" />
<tizen:allow-navigation>*.neatofun.com</tizen:allow-navigation>
<access origin="http://neatofun.com" subdomains="true"/>

</widget>

 
Here is the code for the iframe
 

<iframe  src="http://neatofun.com/ads/ad.html"  border="0" scrolling="no" allowtransparency="true" width="320px" height="50px" style="border: 0; width: 320px; height: 50px;"> </iframe>

 

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

9 Replies
Raghu Kona
Hi, You may need to add url under access in config file. Please refer https://developer.tizen.org/help/index.jsp?topic=%2Forg.tizen.web.appprogramming%2Fhtml%2Fapp_dev_process%2Faccessing_external_network_resources.htm. Regards, Raghu Kona
Josh Dobbs
I added the allow-navigation nodes to the config file but now I get the following error when running on the test device. error while loading /usr/share/tizen-web-ui-fw/latest/themes/tizen-black/theme.js 0:error: SecurityError: DOM Exception 18
Raghu Kona
Can you please share your code.
Josh Dobbs
This is the config.xml file.... My Cool App *.neatofun.com The error only occurs when the allow-navigation node is present. If I remove "*.neatofun.com" then the app does not crash but it still disp0lays the ad in a browser instead of inline in the iframe.
Josh Dobbs
I just added the code to the original post above.
Josh Dobbs
I have updated to Tizen 2.2 and now the app does not crash. However the content of the iframe is still not displayed. Here are the 2 last lines of my config file... *.neatofun.com And here is the code for the iframe... Has anyone else had any luck with something like this?
Josh Dobbs
Doh! I wish it was easier to add code blocks to repliess. I have updated the original post with the current code. App no longer crashes but the banner does not get displayed.
Josh Dobbs
Nevermind...it's working now. The code i put in the original post does work.
cedric guinoiseau
Hi All, I have an iframe in my app and the webview shows. Problems are the scroll doesn't work, I can't go to bottom of page. And the content doesn't resize. Has anyone else had this problem ? Thank you