"f is undefined" FF Error

"f is undefined" FF Error

cbaonecbaone Posts: 4Questions: 0Answers: 0
edited August 2010 in General
I'm getting an error in Firefox. The datatables works great in Safari, Chrome, and even IE, but I'm getting this error in FF - ""f is undefined - undefined"&&typeof e.saved_aaSorting=...getElementsByTagName("tfoot").length> - line 135"

It's also causing another script to on the page to stop working. You can see it here:

http://ucfc.yoogit.com/arborist-for-hire

If anyone could point me in the right direction that would be fantastic. Thanks.

Replies

  • cbaonecbaone Posts: 4Questions: 0Answers: 0
    Sorry! Forgot to add the code I'm using:

    [code]

    $(document).ready(function() {
    $('#arborists').dataTable( {
    "sDom": '<"top"if>rt<"bottom"lp<"clear">'
    } );
    } );

    [/code]
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    You are missing a TR tag in the THEAD element. TH cannot be a child of THEAD, which is what I believe Firefox is complaining about. The other browsers must attempt to correct it by inserting a TR automatically: http://validator.w3.org/check?uri=http%3A%2F%2Fucfc.yoogit.com%2Farborist-for-hire&charset=%28detect+automatically%29&doctype=Inline&group=0

    Allan
  • cbaonecbaone Posts: 4Questions: 0Answers: 0
    edited August 2010
    Thanks! The script is working now, but ever since I added the TR elements the page styling is messed up and I'm getting validation errors from this part of the script:

    [code]<"top"if>rt<"bottom"lp<"clear">'[/code]

    http://validator.w3.org/unicorn/check?ucn_uri=http://www.utahurbanforest.org/arborist-for-hire&ucn_task=conformance
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    edited August 2010
    You can put your script into HTML comments to stop this:

    [code]

    <!--

    -->

    [/code]

    Also I think I missed an angle bracket off my demo code - which probably won't help Firefox out...

    [code]
    $(document).ready(function() {
    $('#arborists').dataTable( {
    "sDom": '<"top"if>rt<"bottom"lp><"clear">'
    } );
    } );
    [/code]

    Allan
  • cbaonecbaone Posts: 4Questions: 0Answers: 0
    Thanks! That did the trick. I was wondering about that angle bracket too. So, I went to the sample code and that's the way it was, so I figured it had to be that way. Thanks for taking a look. Fabulous script by the way!
This discussion has been closed.