ie Filtering

ie Filtering

Tal17Tal17 Posts: 6Questions: 0Answers: 0
edited March 2009 in Bug reports
Hello.
I like datatables and am new to jquery so forgive me if I'm doing something stupid.
I have a table that works beautifully in FF3 but partially fails in IE. (Gives a unknown javascript runtime error).

It doesn't display the count (of 759 rows or whatever) and when i filter - it works partially. (filters too much)

I might be able to provide more details if no one has any info on this sort of thing.
What could it be besides a malformed table? and if it is that why does it work in FF?

Replies

  • Tal17Tal17 Posts: 6Questions: 0Answers: 0
    is there a size limit? the table i was working with is quite large and the line it gives an error in is 1903.
  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin
    Hi,

    There isn't a size limit, beyond what the Javascript engine is capable of (which will be fairly high!) - of course performance will drop the more rows there are, but there shouldn't be a Javascript error.

    Line 1903 in DataTables 1.4.2 is a 'typeof', while in 1.5 beta 2 it is a 'var' declaration - neither of these will throw an error in DataTables. Could you state which version you are using, and also post a link to an example page which breaks. That will made debugging much easier!

    Thanks
    Allan
  • Tal17Tal17 Posts: 6Questions: 0Answers: 0
    edited March 2009
    I was using 1.4.0 before. I upgraded to 1.4.2 and now it is line 1965.
    However, it was of course my fault. it was malformed html before the opening tag.
    (ie it was hidden inside a that wasn't closed.

    The code is very very old and inherited and fairly jumbled in asp.

    Sorry to bother you.
    Thanks for the hard work.

    By the way, I appreciate the way it is fairly easy to dive into for jquery newbies - in fact, for me right now it is one of the reasons to even use jquery in a way. (I user superfish menu but i'm not sure how well that's going to work out)
  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin
    Hehe - ah the joys of inheriting old code... Yes, DataTables tends to assume well formed code, although most browsers tend to do a decent job of re-aligning to DOM if there HTML is messed up.

    Thanks for the complements about DataTables - it's great to hear that you find it easy to use. Really pleased to hear that in fact. With regard to the library I've tried to keep the use of jQuery to selectors and event listeners - in part for speed, but also for the fact that I think it would be a reasonably trivial exercise to port DataTables to almost any other library.

    If you run into any other issues, or have any enhancement ideas, give me a shout!

    Allan
  • Tal17Tal17 Posts: 6Questions: 0Answers: 0
    Thanks again.
    What is the right, and/or easy way to highlight the term you have filtered on?

    Also someone requested in a meeting an "and" feature; probably that does not fit in your plugin, but if you have advice.

    Maybe I'll post other thoughts in a new discussion; perhaps if i am confused someone else will be; at least another newbie
  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin
    Highlighting the filtered term? Oo - I like that idea! What you would need to do is alter the DOM on each filtering event to replace the search term with a bold tag (for example) - it might be a little hairy to do. Another option would be to use something like my Secret library ( http://www.sprymedia.co.uk/article/Secret ) to locate and highlight the filtered term - but again non-trivial (apart from anything else Secret currently need a _very_ new browser).

    The AND filtering option certainly is possible using regular expressions. You can enable regex in the search terms using the API. Two input boxes for example could be readily ANDed together, or you could parse a single input string and pass that to fnFilter().

    Allan
This discussion has been closed.