ciccio
Posts: 0
Joined: Fri Jun 14, 2013 10:40 am

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

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

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

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

Marco Della Gala
Posts: 0
Joined: Mon Mar 04, 2013 1:18 pm

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

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

ciccio
Posts: 0
Joined: Fri Jun 14, 2013 10:40 am

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

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

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

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...

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

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

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

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

Hi Nir -

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

Return to “Issues”