Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ON blur or submit , the field submits! #5

Open
alexseif opened this issue Nov 16, 2011 · 4 comments
Open

ON blur or submit , the field submits! #5

alexseif opened this issue Nov 16, 2011 · 4 comments

Comments

@alexseif
Copy link

alexseif commented Nov 16, 2011

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;
    });
@gregwebs
Copy link
Collaborator

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

@alexseif
Copy link
Author

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

@gregwebs
Copy link
Collaborator

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

@alexseif
Copy link
Author

alexseif commented Nov 20, 2011

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants