Languages

Menu
Sites
Language
Link inside an iframe doesn't work

Friends,

I'm new to Tizen.

I want to load a webpage inside an iframe in my app.

The webpage contains links which the user will click to go to a page on the internet.

But clicking the links inside iframe doesn't work.

Information: It also doesn't work in Chrome.

What do I need to do to make the links work inside an iframe?

Regards,

Manojit Ghosh

Responses

3 Replies
Raghu Kona

Hi,

I have tested the below code and it does work on the device and Web Simulator.

<div data-role="content">

<iframe frameborder='0' height='300px' width='100%'
                style='margin-top: 140px;'
                src='http://www.macmall.com/n/Macbook-Pro-Retina-Display/macNavLinks-753?source=SLICKMWB38600'></iframe>

</div>

Have you enabled the cross-origin policy. If not please add <access origin="*" subdomains="true"/> in the config.xml file.

Regards,

Raghu Kona

Alexander AVSukhov

Hello,

A widget must declare in its config which network resources it will access (such as XMLHttpRequest, iframe, img, script, etc) .

You need add <access> element in config.xml. You can specify protocols, domains, and sub-domains. For example:

<access origin="http://example.org" subdomains="true"/>

 

 

Manojit Ghosh

Thank you.