Display and redisplay

Display and redisplay

jamesgamesjamesgames Posts: 14Questions: 0Answers: 0
edited October 2010 in General
Hi again,

I have made lots of progress; many thanks.

Could you please look at this page: http://74.54.218.34/~riddleyw/Andover/Search.php

What happens is that the entire table seems to load and display and then gets repaginated down to the proper number of display rows. Is this just the way it works, or is it something I'm doing wrong? I can send you any code you want/need. Just let me know. Thanks.

James

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi James,

    This is basically the way DataTables works. It will take the table which is rendered in HTML and then do it's stuff on top of it and display it as needed. Depending on the speed of the browser (and to some extent the internet connection speed) you may or may not see this "Flash Of Unscripted Content".

    I'm seeing the issue on your site as well, and in this case, it's actually the loading of the HTML page which is taking a long time (DataTables will do it's thing once the DOM is ready). Looking at the "Resources" tab in Safari, I can see that it is taking 6.77 seconds to load the document! So that's the problem there. Whatever Search.php is doing is very slow, so it would be worth looking to see if you can optimise that.

    Regards,
    Allan
  • jamesgamesjamesgames Posts: 14Questions: 0Answers: 0
    Thanks, Allan. I'll work on that. One follow up:

    Is it possible to have nothing appear in the grid until someone types something in the search box?
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    It would be possible to put table { display: none } in your CSS and then hook into the search box and display it when something is pressed. One thing to note is that this will slow down IE dramatically (due to it's internals I think for how it parses hidden elements). However, the key thing will be to get that script down to around 250mS.

    Regards,
    Allan
This discussion has been closed.