Andre Hoefs
Posts: 0
Joined: Fri Jul 25, 2014 8:14 pm

Window. open doesn't work

Hi,

i've got a simple question:
i've got a mobilelink an want to open the link ouside the app.
I used the on click-event and the following code:
code
window.open('http://www.abcde.com');
/code
Really simple.
But if i press the link nothing happens.....

Louis
Posts: 0
Joined: Wed Nov 05, 2014 2:03 pm

Window. open doesn't work

Is this on Android or iOS?

I think on Android it's window.location.

On my app i have it set to open in new window using:

codewindow.open('https://yoururl.com', '_blank');/code

or

codewindow.open('https://yoururl.com', '_system');/code

Andre Hoefs
Posts: 0
Joined: Fri Jul 25, 2014 8:14 pm

Window. open doesn't work

I tried both of the codes but they don't work.

Yes, it's Android.

But in the Test area of appery it does'nt work as well.... :-(

Ihor Didevych
Posts: 0
Joined: Wed Nov 19, 2014 7:55 pm

Window. open doesn't work

Hi Andre,

It should be working -
window.open('https://yoururl.com', '_blank');

You can use also -
window.location.href = new_url_here;

Andre Hoefs
Posts: 0
Joined: Fri Jul 25, 2014 8:14 pm

Window. open doesn't work

Hi,

i tried both of the solutions, but both didn't work!

I left the URL of the mobilelink with a "#" cause i want to use the javascript, right?

Is there any way to debug the app?

Andre Hoefs
Posts: 0
Joined: Fri Jul 25, 2014 8:14 pm

Window. open doesn't work

i noticed another error:

for mobilelink event i used "navigate to link" "Url:[url=http:///www.myurl.com]http:///www.myurl.com[/url]" "open in new window"

This is exactly what i want.
But nothing happens as well.....?!????

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

Window. open doesn't work

Hi Andre,

please make sure you run this JS code. Try this code:

pre

alert("before open window");

window.open('https://yoururl.com', '_blank');

/pre

With this code you should get alert before run goal line of code.

Also please use WEINRE to debug your code: http://devcenter.appery.io/documentat...

Regards.

Return to “Issues”