Page 1 of 1

Advanced search clear form

Posted: Tue Mar 22, 2016 11:10 pm
by Danny

Hi,

At the listpage you can make an extended selection.
After you make the selection, we want to go to the advanced search.

We want empty fields, but asp.netmaker remembers the search results from the listpage.

How to empty the search result. Maybe to do something with pageload javascript or jquery.

We tried already a redirect to <table>srch.vbhtml?cmd=resetall

But this is not working.

How to solve this problem.

Regards,


Re: Advanced search clear form

Posted: Wed Mar 23, 2016 12:16 pm
by motfs

There is a "Reset" button in Advanced Search Page. You can add JavaScript code to detect the querystring (cmd=resetall) and trigger to click the "Reset" button, e.g.

// your code to detect querystring value
$("#btnReset").click();


Re: Advanced search clear form

Posted: Thu Mar 24, 2016 4:36 am
by Danny

Thank you, Motfs,

This works fine for me at the global startup search pages:

if (EW_PAGE_ID == "search") {
$("#btnReset").click();
}

Regards,