jquery-uitablefilter icon indicating copy to clipboard operation
jquery-uitablefilter copied to clipboard

ON blur or submit , the field submits!

Open alexseif opened this issue 13 years ago • 4 comments

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;
    });

alexseif avatar Nov 16 '11 15:11 alexseif

Are you sure this is related to uiTableFilter - if you remove the use of uiTableFilter does the issue go away?

gregwebs avatar Nov 16 '11 16:11 gregwebs

yes, when i comment the above lines the issue goes away. any ideas?

alexseif avatar Nov 16 '11 16:11 alexseif

Can you provide a reproduceable case - the html file for this?

gregwebs avatar Nov 17 '11 14:11 gregwebs

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

alexseif avatar Nov 20 '11 02:11 alexseif