jquery-uitablefilter
jquery-uitablefilter copied to clipboard
ON blur or submit , the field submits!
Thank you for this script :) I'm facing this bug that is driving me insane, every time the filter input text looses focus or on enter it submits as if there was a form of type get and action to filter.. I can't get it to stop that!! here's my code
var theTable = $('.rows_table');
$("#filter").keyup(function() {
$.uiTableFilter( theTable, this.value );
return null;
});
Are you sure this is related to uiTableFilter - if you remove the use of uiTableFilter does the issue go away?
yes, when i comment the above lines the issue goes away. any ideas?
Can you provide a reproduceable case - the html file for this?
yeah sure, I dissected down to what i think its relavant
filter input
<span class="left block">
<label for="filter">Filter</label>
<input name="filter" id="filter" value="" maxlength="30" size="30" type="text"/>
</span>
Table
<div id='left_column_content' >
<form action="" method="POST" name="inquiry" id="inquiry">
<table class="rows_table" cellpadding="6" id="inquiry_table">
...
JS to init
$(function() {
// $('.rows_table th:last').addClass("{sorter: false}");
$(".rows_table").tablesorter();
var theTable = $('.rows_table');
$("#filter").keyup(function() {
$.uiTableFilter( theTable, this.value );
return null;
});
$("#filter").blur(function(){
return false;
})
});
I would greatly appreciated if you can help me out here :)
Cheers
Alex