Page 1 of 1

Hyperlinks from database

Posted: Sat May 24, 2014 1:53 pm
by Terry Gilliver

I have a collapsible set which contains a link component. This is populated from a collection of more than one record, effectively giving men a number of links.

How do I create a 'navigate to page' javascript function for each link?


Hyperlinks from database

Posted: Sat May 24, 2014 3:18 pm
by Illya Stepanov

Hi Terry,

Could you please show the mapping structure, especially in part with links to the collapsible component?


Hyperlinks from database

Posted: Sat May 24, 2014 5:26 pm
by Terry Gilliver

Mapping: Image


Hyperlinks from database

Posted: Mon May 26, 2014 2:23 am
by Yurii Orishchuk

Hi Terry.

Please follow these steps:

1 Map text to the text property. http://prntscr.com/3mmon2/direct

2 Map link to the URL property. http://prntscr.com/3mmozi/direct

3 Click "JS" for the "URL" property. And fill it with following code:

precode

var pageName = "Screen1&quot

var href = 'javascript:navigateTo("' + pageName + '")';

return href;

/code/pre

Note you should change "Screen1" with page you need. Also you can use "value" variable.

That's all. Regards.


Hyperlinks from database

Posted: Tue May 27, 2014 10:26 am
by Terry Gilliver

If you put the url link from the database into the url parameter of the link component, it attempts to got to that site, for instance http://www.bing.com works, however http://uk.yahoo.com doesn't.

I have been told from one of your guys that there is a bug in the link component, and that the url should be set to #.

Then you can navigate using javascript. if the url is set to # then the only place to actually store the value would be the text field. What are the properties/method names available to the link component?

I assume I could access them by something like: var url=Appery('news_link').href ( or something along those lines.


Hyperlinks from database

Posted: Tue May 27, 2014 4:51 pm
by Evgene Karachevtsev

Hello Terry,

You need to test your application without moibile frame.


Hyperlinks from database

Posted: Tue May 27, 2014 5:50 pm
by Terry Gilliver

Thanks, sorted now, no need for javascript at all