Jump to content

Jquery load and possible memeory leak - please help


leruman

Recommended Posts

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> 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.