Loading ...
Sorry, an error occurred while loading the content.

14067Re: Simple Datatable Filter Example

Expand Messages
  • mgossmer
    Jun 3, 2007
      Hmm, no ideas?


      --- In ydn-javascript@yahoogroups.com, "mgossmer" <mgossmer@...> wrote:
      >
      > Actually the scenario is even more easy: assume that the maximum set
      > of records is already and completely loaded (as a HTML table, on which
      > the datatable component renders). For example, imagine a table with
      > 100 products, their name and their price. Now, the user should be able
      > to use a simple select box to filter these products via a "less then
      > 50 dollar", "less then 100 dollar" selection etc.
      >
      > This might lead to something using the onchange event in the select
      > box, calling some funtions on the datatable component - but which
      > functions in what manner? All I found were high-end oversized examples
      > in conjunction with AutoComplete.
      >
      >
      > --- In ydn-javascript@yahoogroups.com, "Matt Howey" <matthewhowey@>
      > wrote:
      > >
      > > In MySQL I would maybe use a query like this:
      > >
      > > SELECT DISTINCT name FROM events WHERE MATCH (column1, column2)
      > > AGAINST ('".$GET['param']."*' IN BOOLEAN MODE) LIMIT 60;
      > >
      > >
      > > So basically, the SQL query is searching "column1" and "column2" for
      > > any word in either of those columns that matches our GET request that
      > > was sent to the script (AJAX using a YUI XHR DataSource...).
      > >
      > > I believe this query will work on MySQL 4.1.2 and higher as that is
      > > when the MATCH AGAINST showed up.
      > >
      > > Please, by all means, if anyone has a faster way with PHP/MySQL to do
      > > this pattern match, throw it out!
      > >
      > > Hope this helps someone,
      > >
      > > Matt Howey
      > >
      > >
      > > --- In ydn-javascript@yahoogroups.com, "mgossmer" <mgossmer@>
      > > wrote:
      > > >
      > > > Hi,
      > > >
      > > > I know this example, but I asked myself if there may be a much more
      > > > simple example then this, something without autocomplete, dpu ... -
      > > > for example filtering a table just based upon a value selected from
      > > a
      > > > <select> box.
      > > >
      > > >
      > > > Regards
      > > > Markus
      > > >
      > > >
      > > >
      > > > --- In ydn-javascript@yahoogroups.com, "Ted Husted" <husted@> wrote:
      > > > >
      > > > > There an example that uses autocomplete to filter a DataTable w/o
      > > > > reloading.
      > > > >
      > > > > *
      > > http://yuiblog.com/sandbox/yui/v222/examples/datatable/filterRows.php
      > > > >
      > > > > HTH, Ted.
      > > > > http://yazaar.org/
      > > > >
      > > > > --- In ydn-javascript@yahoogroups.com, "mgossmer" <mgossmer@>
      > > wrote:
      > > > > >
      > > > > > Hi,
      > > > > >
      > > > > > is there a simple example out there, showing datatable
      > > filtering based
      > > > > > on an "onchange" in a select dropdown, without reloading the
      > > site?
      > > > > >
      > > > > >
      > > > > > Regards
      > > > > > Markus
      > > > > >
      > > > >
      > > >
      > >
      >
    • Show all 9 messages in this topic