Page 1 of 1

Opening a website link

Posted: Tue Jul 15, 2014 6:08 am
by Lim Samantha

Hi,
how do it open a website link by clicking at button on my application?
I tried to follow this tutorial but i do not want the link to display on the input.

http://devcenter.appery.io/tutorials/...


Opening a website link

Posted: Tue Jul 15, 2014 7:08 am
by Evgene Karachevtsev

Hello Lim,

In the tutorial, in the js code, the address is taken from the input

preAppery('link_source').val()/pre

You should replace this part with the line with your address in the js code

pre'http://mysite.com'/pre


Opening a website link

Posted: Tue Jul 15, 2014 7:22 am
by Lim Samantha

Hi,

I tried replacing but my codes still doesnt go to the website.

My codes are:

var radioGroup = $('input[name=cordova_web_view]:checked');
window.open('http://google.com');


Opening a website link

Posted: Tue Jul 15, 2014 7:47 am
by Lim Samantha

Hi so sorry, it works fine now.

But can i ask how do i make the website appear inside my link instead of opening it in a new tab?

i have added the cordova_web_view, stated in the tutorial, but it doesnt work.


Opening a website link

Posted: Tue Jul 15, 2014 9:26 am
by Evgene Karachevtsev

Lim,

You may open it inside, but how then to return to the application? On Android there is a button Back, but there isn't on IOS. So it is better to open in a new tab and close by button Done


Opening a website link

Posted: Tue Jul 15, 2014 9:46 am
by Lim Samantha

Hi,
Thanks for the advice. Isit possible to do a pop up box where the website will display in the box and when they done they can just click the cross button?
As we are doing it on ipad, if we open the website it will go to Safari and it will be very troublesome to go back to the application.


Opening a website link

Posted: Tue Jul 15, 2014 11:29 am
by Evgene Karachevtsev

Lim,

You may open it inside the popup, in iframe. More information you may find here:
https://developer.mozilla.org/ru/docs...
Or you may do this way:
prewindow.open('http://apache.org', '_blank', 'location=yes');/pre