Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

jquery datatables GO button for filter

Posted on 2011-10-24
8
Medium Priority
?
753 Views
Last Modified: 2012-05-12
how can i prevent filtering on every keyup and also add a button to filter on the filterbox value?
0
Comment
Question by:dgrafx
  • 5
  • 2
8 Comments
 
LVL 22

Expert Comment

by:Mrunal
ID: 37022060
you can use preventDefault() method in jQuery.

check this out:

http://api.jquery.com/event.preventDefault/

and attach event for filtering on new added filter button.
0
 
LVL 25

Author Comment

by:dgrafx
ID: 37024277
the correct answer would be to use fnFilterOnReturn()
took me forever to find that!
plust thats only half the answer but good enough

thanks though ...
0
 
LVL 25

Author Comment

by:dgrafx
ID: 37045826
I've requested that this question be closed as follows:

Accepted answer: 0 points for dgrafx's comment http:/Q_27412162.html#37024277

for the following reason:

found the answer myself
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 26

Expert Comment

by:EddieShipman
ID: 37040573
I had the same problem, if you'll reopen I'll show you how I did it.
0
 
LVL 25

Author Comment

by:dgrafx
ID: 37044133
Eddie
The question is still open - so if you want to post an answer ...

Just so you know though - the built in method of fnFilterOnReturn() (which changes the filtering function from keyup to carriage return) works better for me than what I had originally asked for - which was a button that triggered the filtering when clicked.

But since I can award points at will (expert status) - if it is a good solution and I figure I might be able to use it some time - I would then award points.

Thanks
0
 
LVL 26

Accepted Solution

by:
EddieShipman earned 2000 total points
ID: 37045744
See my thread on the DT forums (I am Mrbaseball34):
http://www.datatables.net/forums/discussion/4222/server-side-ajax-search-wait-till-finish-entering/p1

Also, since I was using ajax to obtain my data, this plugin worked wonders:
http://datatables.net/plug-ins/api#fnSetFilteringDelay
0
 
LVL 25

Author Comment

by:dgrafx
ID: 37045827
I would like to accept eddieshipman's post as it provided additional valuable info.
Your system tells me I must cancel the request to delete this thread first - HOW do I cancel?

Thanks
0
 
LVL 25

Author Closing Comment

by:dgrafx
ID: 37045831
Thanks for the valuable info
it may come in handy
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question