Page 1 of 1

window.open + iframe problem (working on the desktop but not working on appery tester on mobile)

Posted: Wed Feb 05, 2014 2:42 pm
by ciccio

hello,
i'm building an android/ios app and i'm trying to open a link in my app using an iframe
(i would like to obtain that a web page will be opened in my app but it should be wrapped between my app header and footer)

a used the code suggested in the following post:

https://c.getsatisfaction.com/apperyi...

and
https://c.getsatisfaction.com/apperyi...

so i added an html component "html_7" and in the html i added
code<iframe name="iframeName" width="320" height="480">></iframe>/code

then on a click event of a button a run a custom js:
codevar ref = window&#46;open("https:&#47;&#47;mobile&#46;sella&#46;it/mobileweb/portal&#46;aspx", "iframeName","toolbar=yes, menubar=yes, location=yes, titlebar=yes");
ref&#46;addEventListener('exit', function() { alert('chiuso'); });/code

when i test the app on my desktop (chrome browser) it seems to work properly (even if neather location nor toolbar etc. are showed)
when i try to test on my mobile (android 4.1.2) and i click on the button i get nothing.

please help me to solve the problem


window.open + iframe problem (working on the desktop but not working on appery tester on mobile)

Posted: Wed Feb 05, 2014 3:04 pm
by Kateryna Grynko

Hello,

It's better to use this code to open a page in iframe:pre$("[name=iframeName]")&#46;attr("src", "http:&#47;&#47;example&#46;com");/pre


window.open + iframe problem (working on the desktop but not working on appery tester on mobile)

Posted: Thu Feb 06, 2014 11:22 pm
by Marco Della Gala

I tested your solution and it works but without using the window.open i can't control event like before load or on load exit etc. I would like to add to the page an image with a spinner and to hide it when the web page in the iframe has been loaded.
Why the solution with window.open("url", iframeName is working on the desktop and not on the tester in the mobile


window.open + iframe problem (working on the desktop but not working on appery tester on mobile)

Posted: Fri Feb 07, 2014 8:45 am
by ciccio

i tested your solution and it works,
but without using the window.open i can't control event like before load or on load exit etc. I would like to add to the page an image with a spinner and to hide it when the web page in the iframe has been loaded.
Why the solution with window.open("url", "iframeName") is working on the desktop and not on the tester in the mobile


window.open + iframe problem (working on the desktop but not working on appery tester on mobile)

Posted: Fri Feb 07, 2014 5:29 pm
by Maryna Brodina

Hello! It's because on device window.open opens page in InAppBrowser, but InAppBrowser doesn't open page in iframe. Here is more information http://cordova.apache.org/docs/en/3.0...


window.open + iframe problem (working on the desktop but not working on appery tester on mobile)

Posted: Thu May 28, 2015 12:47 pm
by Nir Gaiger

is there a solution for this issues with iframe? i am looking for a solution for this as well.


window.open + iframe problem (working on the desktop but not working on appery tester on mobile)

Posted: Thu May 28, 2015 6:42 pm
by Illya Stepanov

Hi Nir -

If the issue was related to InAppBrowser, I'm not sure if additional functionality was added since then.