Page 1 of 1
Reset Search
Posted: Mon Sep 09, 2013 9:33 pm
by daniel
Hello,
Just wondering if there is a way to reset a search, or to clear out the search box by clicking a button?
Thanks,
Dan
PS. Great product!
Re: Reset Search
Posted: Tue Sep 10, 2013 9:22 pm
by zazzium
Hi,
actually, it's pretty easy.
Copy the code to
Custom Code-> Before Browse
Code: Select all
$js = "
$(document).ready(function(){
var reset_search_bt_name = 'Reset'; //reset button name
var reset_search_bt = '<button class=\"actionButton\" id=\"reset_searh_bt\">'+reset_search_bt_name+'</button>'
$('#actionButtons').append(reset_search_bt);
$('#reset_searh_bt').click(function(){
$('#search').val('');
changeAction();
$('#thebrowse').submit();
});
});
";
addJSfunction($js);
(if you want all the brows forms have this, you have to modify the source code)
zazzium
Re: Reset Search
Posted: Wed Sep 11, 2013 10:27 pm
by daniel
Awesome, works perfectly. Thanks!
Re: Reset Search
Posted: Sat Sep 14, 2013 11:40 am
by massiws
.