Page 1 of 1

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

Posted: Fri Mar 13, 2015 7:49 pm
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?


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

Posted: Fri Mar 13, 2015 8:43 pm
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


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

Posted: Mon Mar 16, 2015 3:58 am
by Yurii Orishchuk

Hi Carlos,

Have you been able to fix this problem?

Regards.


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

Posted: Mon Mar 16, 2015 2:56 pm
by Carlos

no, unfortunately


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

Posted: Tue Mar 17, 2015 5:55 pm
by Carlos

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


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

Posted: Wed Mar 18, 2015 2:59 am
by Yurii Orishchuk

Hi Carlos,

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

Regards.


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

Posted: Tue Jun 09, 2015 11:23 am
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


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

Posted: Wed Jun 10, 2015 1:48 am
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.