Chris6603029
Posts: 0
Joined: Thu Jan 23, 2014 5:37 pm

integrate website URL's returned from database query onto UI as a clickable link to the URL which can also be saved as d

We have built a simple database including URL's to pages on our website. We are struggling to work out how to get these URL's returned from a query to the database in the form of a clickable link which can also be set as a default so that next time the app is launched the user can click straight through to their chosen default URL without searching database again.

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

integrate website URL's returned from database query onto UI as a clickable link to the URL which can also be saved as d

Hello! You can map to Link, you can also map to any other component and add navigating actions for Link on click element. For example you can open in InAppBrowser or default device browser.

Chris6603029
Posts: 0
Joined: Thu Jan 23, 2014 5:37 pm

integrate website URL's returned from database query onto UI as a clickable link to the URL which can also be saved as d

Hello Maryna, thank you for getting back. Can you tell me what javascript I need to use to get a label or button to navigate to a URL returned from our database?

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

integrate website URL's returned from database query onto UI as a clickable link to the URL which can also be saved as d

Hi Chris,

Do you want to add a navigation to link for a button or something else? Do you want to store it in localStorage or in a Link component? Do you want to open it in a new window or in the current?

Chris6603029
Posts: 0
Joined: Thu Jan 23, 2014 5:37 pm

integrate website URL's returned from database query onto UI as a clickable link to the URL which can also be saved as d

Hi Katya, I need to store the URL returned from my search query into local storage when say a check box is ticked, then set this URL as a default button on the start screen so that when a user re-opens the app and clicks the button it takes them to their chosen page on our site.

Chris6603029
Posts: 0
Joined: Thu Jan 23, 2014 5:37 pm

integrate website URL's returned from database query onto UI as a clickable link to the URL which can also be saved as d

Thanks Katya, that's exactly what we need. I will work through it and let you know how I get on.

Chris6603029
Posts: 0
Joined: Thu Jan 23, 2014 5:37 pm

integrate website URL's returned from database query onto UI as a clickable link to the URL which can also be saved as d

Hi Katya, I have worked through this solution but I am still having problems. Is it possible for you to actually see how I have mapped my app? Thanks Chris.

Chris6603029
Posts: 0
Joined: Thu Jan 23, 2014 5:37 pm

integrate website URL's returned from database query onto UI as a clickable link to the URL which can also be saved as d

Hello Maryna, I have almost sorted it all out, I just need to know what javascript to use to open my URL within the app rather than a new browser window. I am currently using : window.open(localStorage.getItem('URL'), '_system');
thanks Chris.

Return to “Issues”