leruman Posted May 7, 2012 Share Posted May 7, 2012 Greetigns to all I am beginner in java script and jquery. I have encountered problem which can not solve. On left side of my site have some buttons that when are clicked load in another div php script which also has his java script. Code works ok, but after several clicks memory load get very big. I see two problems with this - some bug in Ajax load () function (less probably) or I am doing this on wrong way (more probably). I would be grateful if someone look in this and try to find where I made mistake. I am planing lot of elelments of my page to base on this load() metod and to be loaded this way, so need to find what i am doing worong in the begining. Nota: Code is done in procedural way, I am not ready to go to object until i master this. JQuery script that caled after button is clicked: $('.xxx').click(function() { $('.content').empty().load('viewchar.php', { char:$(this).next('.hiddenP').val() }); }); Part of html code that trigers script <div class='name' > <input type='reset' id='character94' class='xxx' value='dfgfdg'/> <input type='text' value='94' class='hiddenP'/> </div> Quote Link to comment https://forums.phpfreaks.com/topic/262216-jquery-load-and-possible-memeory-leak-please-help/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.