Page 2 of 3

Open URL from local storage within app or in default browser

Posted: Wed Nov 06, 2013 2:05 pm
by Maryna Brodina

1) On scanner service success event delete Set localStorage variable. Instead use mapping from text to QR_url localStorage
2) To open in standard browser use the following code: prewindow.open(localStorage.getItem('QR_url'), '_system');/pre


Open URL from local storage within app or in default browser

Posted: Wed Nov 06, 2013 2:20 pm
by Rok

Thank you Marina, works great!


Open URL from local storage within app or in default browser

Posted: Tue Apr 01, 2014 4:42 pm
by laura6372139

hi;

I have this code but don't work:
Is a Infowindows:
div id='content'
form id='button'
div
input type='button' style='background-color:white;border-width:thin;border-style:solid;border-color:white' value='Museo Nino Bravo' onclick=location.href=(localStorage.getItem('foto'), '_system')
div
form
div

however, if I change this code works perfectly.

div id='content'
form id='button'
div
input type='button' style='background-color:white;border-width:thin;border-style:solid;border-color:white' value='Museo Nino Bravo' onclick=location.href=chart1.html
div
/form
div

My database:

Image

And my mapping with my local storage "foto":

Image


Open URL from local storage within app or in default browser

Posted: Wed Apr 02, 2014 1:43 am
by Igor

Hi,

Please replace your code:
pre
location.href=(localStorage.getItem('foto'), 'system')
/pre
with the following:
pre
window.open(localStorage.getItem('foto'), 'system');
/pre


Open URL from local storage within app or in default browser

Posted: Wed Apr 02, 2014 7:44 am
by laura6372139

Hi Igor:

Don't work!

this is my public link:

http://appery.io/app/mobile-frame?src...

Thanks


Open URL from local storage within app or in default browser

Posted: Wed Apr 02, 2014 8:27 pm
by Maryna Brodina

Hello!

Could you post steps to reproduce?


Open URL from local storage within app or in default browser

Posted: Thu Apr 03, 2014 8:19 am
by laura6372139

It's ok

It work!

Thanks


Open URL from local storage within app or in default browser

Posted: Thu Apr 03, 2014 8:33 am
by Kateryna Grynko

Laura,

Thank you for the update! Glad it works.


Open URL from local storage within app or in default browser

Posted: Sat Jul 19, 2014 4:23 am
by Alex GG

Hi!
Im using this same steps, but can't make it works,,,I have a label bind to text, and also to localStorage. and after reading the QR it shows the url in the label, but the app didnt navigate to the link...

I also followed this post:
https://getsatisfaction.com/apperyio/...

with no luck... Im testing on an iphone running iOS 7.1

Any suggestion?

Regards


Open URL from local storage within app or in default browser

Posted: Fri Aug 01, 2014 4:15 pm
by Jerry Hess

How would you do this in an iFrame?