TRYING TO LINK THE PAGES FROM A TABLE

Hi: everyone!

 I have a search engine function in my website such as  


after i hit submit button the information that I put in the ‘input’ will be a searching term in my database, and lastly will be display in the table. the code that i am using is

export function button1_click(event,$w) {
wixData.query(“drugdatabase”).contains(‘name’, $w(‘#input1’).value)
.find()
.then(res =>{
$w(‘#table1’).rows= res.items;

}); 

}
my question is after i get the result that show in the table… how can Link it to a page that i current have in my website ??

anyone has any idea ~??? Thanks in advance !!

I had trouble with this as well. Unfortunately, when querying the dataset and outputing the table, it doesn’t seem to maintain index links. The best way I found was to create another field in the tablet with the URL link to the page. Then on the page, use code to set the table properties OnReady, setting the URL field to hidden. When the user clicks the table row you can set it to follow the URL that’s there.

2 Likes

thanks !!! you give me a very good idea ~!