iFrame links to open using _system instead of withing iframe or inAppBrowser

This forum contains topics that were moved from Get Satisfaction
Carlos
Posts: 0
Joined: Wed Jul 09, 2014 6:50 pm

iFrame links to open using _system instead of withing iframe or inAppBrowser

Post by Carlos »

Is it possible to force open iFrame links using _system? I have full control of both the app and the site reference in the iFrame. Links within the iframe use the following syntax [url=http://#]Test Link[/url]. This link open to the appropriate location however it appears to open in the inappbrowser and not the system default. The other option I attempted to do was to attempt to do a xmlhttp.responseText; to a container div by setting the .innerHTML to the responseText; however it does not appear as if that is allowed due to cross domains and responseText was always blank. Same with calling a javascript parent.function from the link. The reason I want default browser is due to the lack of zoom capability with the inappbrowser. Note: tried a rel="nofollow"Test Link/a but that just opens inappbrowser with non of those options enabled.

Is this something that is possible or am I chasing a unicorn here?

Carlos
Posts: 0
Joined: Wed Jul 09, 2014 6:50 pm

iFrame links to open using _system instead of withing iframe or inAppBrowser

Post by Carlos »

Looks like code was changed to links in my original post so here goes again.

atag onclick="window.open(URL, '_system'); return false;"Test Link

atag onclick="window.open(URL, '_blank', 'EnableViewPortScale=yes', 'resizable=yes', 'titlebar=yes'); return false;"Test Link</atag

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

iFrame links to open using _system instead of withing iframe or inAppBrowser

Post by Yurii Orishchuk »

Hi Carlos,

Have you been able to fix this problem?

Regards.

Carlos
Posts: 0
Joined: Wed Jul 09, 2014 6:50 pm

iFrame links to open using _system instead of withing iframe or inAppBrowser

Post by Carlos »

no, unfortunately

Carlos
Posts: 0
Joined: Wed Jul 09, 2014 6:50 pm

iFrame links to open using _system instead of withing iframe or inAppBrowser

Post by Carlos »

no luck yet, any ideas would be greatly appreciated as no answer yet

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

iFrame links to open using _system instead of withing iframe or inAppBrowser

Post by Yurii Orishchuk »

Hi Carlos,

Please give us your app public link and describe steps to reproduce this issue in your app.

Regards.

Nir Gaiger
Posts: 0
Joined: Thu Oct 23, 2014 12:14 pm

iFrame links to open using _system instead of withing iframe or inAppBrowser

Post by Nir Gaiger »

I am also looking for a solution for this issue, I have the same exact issue, I have an app that warp a webpage in my app using iframe (I have app header and app footer but the main content is an iframe that show content from my site). in my website i have add links syntax: <a href="#" onclick="window.open('<?php the_field('aff_link'); ?>', '_system');"><Image/></a>

I did try _system and _blank but the link open in app browser and not in default system browser

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

iFrame links to open using _system instead of withing iframe or inAppBrowser

Post by Yurii Orishchuk »

Hi Nir,

Following code works only in cordova context.

pre

window&#46;open("xxxxx", "_system");

/pre

Iframe has not this context. Thus you can not use such code in iframe.

You need to run this code from the app context. So you need to pass somehow needed event to app context.

Please read more about cross domain manipulation in internet. For example here: http://community.phonegap.com/nitobi/...

Regards.

Post Reply