Default Filtering via a button click
Default Filtering via a button click
Hello:
Here is my current situation. I have DataTables running beautifully in an ecommerce application. I am using AJAX datasource, sorting, custom styles, hiding columns where required everything works fine. I have tested the application using IE, FireFox, Opera all works fine.
Unfortunately we need to embed our web site within a COTS product, its a membership and event management system, its a third party application. Now within this application you can add html links or external web pages which load within its main navigation frame. I don't know exactly how it works, and unfortunately I won't be able to. I do know that it is using IE as the browser engine. However, for some reason, maybe its using a COM IE WebBrower control to render the page, the filtering does NOT work. Meaning, unlike simply opening the web site in your default browser, when you type in the the default filtering text box, nothing happens. Its almost like whatever default event the filter is responding to (is it key press?) is not registering or the actual filtering just doesn't fire. Also, unlike FF where I can use FireBug or similar tools for IE, I have no way of knowing what is going on, this is a closed box, so I'm speculating as to why the out of the box "filter as you type" functionality isn't working.
If it matters, we are using version 1.61 of DataTables and this problem only occurs when you use the web site embedded within this COTS system navigation window.
So at this point, I'm wondering if I somehow changed the default filtering to invoke on button press, not on key press as you type, it might still work. So my question is, is this easily done? Is there a way to invoke the default filtering event via a button click? I don't want to re-invent the wheel, just try to invoke the command through a button click.
Any ideas or help would be appreciated. I'd love to get it to work as is, but I probably haven't provided enough information to help trouble-shoot and I can't provide much else. And simply telling you the url won't help, since opening this web site in any standard browser works fine, just the embedded IE Control is failing.
Thanks in advance
Here is my current situation. I have DataTables running beautifully in an ecommerce application. I am using AJAX datasource, sorting, custom styles, hiding columns where required everything works fine. I have tested the application using IE, FireFox, Opera all works fine.
Unfortunately we need to embed our web site within a COTS product, its a membership and event management system, its a third party application. Now within this application you can add html links or external web pages which load within its main navigation frame. I don't know exactly how it works, and unfortunately I won't be able to. I do know that it is using IE as the browser engine. However, for some reason, maybe its using a COM IE WebBrower control to render the page, the filtering does NOT work. Meaning, unlike simply opening the web site in your default browser, when you type in the the default filtering text box, nothing happens. Its almost like whatever default event the filter is responding to (is it key press?) is not registering or the actual filtering just doesn't fire. Also, unlike FF where I can use FireBug or similar tools for IE, I have no way of knowing what is going on, this is a closed box, so I'm speculating as to why the out of the box "filter as you type" functionality isn't working.
If it matters, we are using version 1.61 of DataTables and this problem only occurs when you use the web site embedded within this COTS system navigation window.
So at this point, I'm wondering if I somehow changed the default filtering to invoke on button press, not on key press as you type, it might still work. So my question is, is this easily done? Is there a way to invoke the default filtering event via a button click? I don't want to re-invent the wheel, just try to invoke the command through a button click.
Any ideas or help would be appreciated. I'd love to get it to work as is, but I probably haven't provided enough information to help trouble-shoot and I can't provide much else. And simply telling you the url won't help, since opening this web site in any standard browser works fine, just the embedded IE Control is failing.
Thanks in advance
This discussion has been closed.
Replies
What you need to do is simply call 'fnFilter' ( http://datatables.net/api#fnFilter ) with the value you want to call on (i.e. read it from the input box) when the button is clicked (with a 'click' event listener).
Allan
Thanks for the reply. Just to follow up, yes, I just added a button next to the filter input control and I'm filtering through the button click, it works fine. Just to provide more information, I tracked down the problem, for some crazy reason, within the Third Party Application Navigation Frame the .keyup() event which is being assigned to the input control just wasn't firing - - no idea why. After I resolved that was indeed the issue, I didn't bother with it anymore, and just moved to a button event.
Thanks again