Results 1 to 8 of 8

Thread: [DHTML] HTML Table Filter Generator

  1. #1
    Join Date
    Jul 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default [DHTML] HTML Table Filter Generator

    1) CODE TITLE: HTML Table Filter Generator

    2) AUTHOR NAME/NOTES: Koalyptus

    3) DESCRIPTION: This script adds to any html table a "filter by column" feature that enables users to filter and limit the data displayed within a long table. It even works on tables with uneven rows. The script automatically adds a filter grid bar at the top of the desired table.

    4) URL TO CODE: http://mguglielmi.free.fr/scripts/Ta...eFilter_EN.zip

    5) URL TO DEMO: http://mguglielmi.free.fr/scripts/TableFilter/?l=en

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Ooh, I like this one. Very impressive. One suggestion: optionally allow regex?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I agree, it's very nice. Since it's already featured on our sister site JavaScript Kit, I'll probably forgo posting it to DD as well.

  4. #4
    Join Date
    Jul 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi Twey! Could you please explain a little bit more precisely your suggestion ?

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Regular expressions, http://www.regular-expressions.info/. A very powerful syntax to allow matching of complex patterns. Probably not your average user's cup of tea (hence "optional") but power users will find it very useful.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Yeah. For example, I can make a code to validate e-mails using for-loops and other stuff, but with Regular Expressions, I can use a couple of lines:
    Code:
    <script language="javascript">
    function validateString(input) {
    var string = /\w+\@\w+(\.\w{3})$/
    if (string.test(input)) {alert("valid")}
    else (alert("invalid"))
    }
    </script>
    - Mike

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    A couple of lines that may or may not run.
    Code:
    <script type="text/javascript">
    function validateString(input) {
      var string = /\w+\@\w+(\.\w{3})$/;
    
      if (string.test(input)) alert("valid");
      else alert("invalid");
    }
    </script>
    Obviously this is example code, and the pattern leaves much to be desired.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Yeah, you can obviously go in more depth with this
    - Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •