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

Open URL from local storage within app or in default browser

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

Rok
Posts: 0
Joined: Wed Oct 09, 2013 7:48 am

Open URL from local storage within app or in default browser

Thank you Marina, works great!

laura6372139
Posts: 0
Joined: Wed Oct 30, 2013 11:54 am

Open URL from local storage within app or in default browser

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

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Open URL from local storage within app or in default browser

Hi,

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

laura6372139
Posts: 0
Joined: Wed Oct 30, 2013 11:54 am

Open URL from local storage within app or in default browser

Hi Igor:

Don't work!

this is my public link:

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

Thanks

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

Open URL from local storage within app or in default browser

Hello!

Could you post steps to reproduce?

laura6372139
Posts: 0
Joined: Wed Oct 30, 2013 11:54 am

Open URL from local storage within app or in default browser

It's ok

It work!

Thanks

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

Open URL from local storage within app or in default browser

Laura,

Thank you for the update! Glad it works.

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

Open URL from local storage within app or in default browser

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

Jerry Hess
Posts: 0
Joined: Fri Aug 01, 2014 4:13 pm

Open URL from local storage within app or in default browser

How would you do this in an iFrame?

Return to “Issues”