problem with .html function - memory leak ?

problem with .html function - memory leak ?

jeansonjeanson Posts: 9Questions: 0Answers: 0
edited March 2010 in General
Hi everybody,

Here is a behaviour very strange that i noticed on IE :
I have the following code (a part of):
[code]
$('#the_table tr)').bind("click", function () {
$(this).addClass('row_selected');
$('#screen').html('

Replies

  • jeansonjeanson Posts: 9Questions: 0Answers: 0
    No ideas ?
    Maybe the problem comes from .html ? because when I do
    [code]
    "fnDrawCallback":function (oSettings){
    $('#screen').html('
  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin
    Possibly the PDF viewer is creating a new instance and not releasing it whenever you display the iframe? There shouldn't be anything wrong with that callback, unless you are apply event handlers to it - which I'm sure you aren't since it's a pdf viewer... I'd suggest some profiling tools in IE to see where the memory is going...

    Allan
  • jeansonjeanson Posts: 9Questions: 0Answers: 0
    Allan,

    Thank You for your answer.
    I had never specify a special PDF viewer so I think that it is the "default" one that is used and I do not apply even handler on the iframe.
    I'll have a look on the profiling memory tools and let you know about the results.
    I think that the problem could come from the PDF because I have another strange behaviour with it : with exactly the same code as above when i'am trying to do "search" I am able to specify only 1 caracter in the search box and i lose the focus on the search box. So I have to click in the box and add another caracter but again i lose the focus. I tried to "force" the focus (by a .focus) on the search box but nothing works. Is there a way to fix that - I mean not loosing the focus or force the focus to stay on the search box ?
  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin
    It sounds like something is stealing the focus from the main HTML. I'm not sure why that would be to be honest - I'd suggest setting up a test page without DataTables, which does something similar (loading a pdf on key press) and see if it also has this behaviour. If so, then it's not related to DataTables (I'd be surprised if it were to be honest), and possibly something you'd need to take up with Adobe or whoever is making the PDF viewer plug-in.

    Allan
This discussion has been closed.