[jQuery] Re: Cleaning up javascript before ajax load

2009-07-05 Thread Veeru
Hi there guys i was thinking of another solution, just watn to get your opinion as well. In my javascript, i was thinking of having everything in a name space, something like this namespace a=function(){ setEvents=function(){ }, unsetEvents=function(){ }, destroy=function(){ } } So ever

[jQuery] Re: Cleaning up javascript before ajax load

2009-07-02 Thread waseem sabjee
in your ajax all you can have the following : $.ajax({ url:"b.html", cache:false, // cache or not async:true, // load asynchronously or not success:function(html) { // code here } }); On Thu, Jul 2, 2009 at 6:00 AM, Charlie wrote: > one more thing you might look at and maybe get clarification

[jQuery] Re: Cleaning up javascript before ajax load

2009-07-01 Thread Charlie
one more thing you might look at and maybe get clarification on empty()   " Note that this function starting with 1.2.2 will also remove all event handlers and internally cached data. http://docs.jquery.com/Manipulation/empty Veeru wrote: Hi Charlie I have checked the links you gave me,

[jQuery] Re: Cleaning up javascript before ajax load

2009-07-01 Thread Charlie
all the memory issues are over my head, I was hoping someone in the know might provide an interesting answer myself. I remembered that test , thought it might interest you. Veeru wrote: Hi Charlie I have checked the links you gave me, found some interesting stuff like adding a .html("")

[jQuery] Re: Cleaning up javascript before ajax load

2009-07-01 Thread Veeru
Hi Charlie I have checked the links you gave me, found some interesting stuff like adding a .html("") before updating the ajax content; but in the problem situation mentioned, they were only load html, but what if there is js as well - like if any element has an onClick() event in the html, and t

[jQuery] Re: Cleaning up javascript before ajax load

2009-07-01 Thread Veeru
thanks for the reply waseem i was thinking something along the same lines as well, to keep all the js in an external file and probably load it even before the ajax pages are called so there would be no js in the ajax calls, just html. My web application, is something that usually runs round the c

[jQuery] Re: Cleaning up javascript before ajax load

2009-07-01 Thread Charlie
there was an interesting thread on this a few months ago. Take a look at the test run, was continuous loading of large file every 200 ms. The OP ran test for a day Solution Thread: http://groups.google.com/group/jquery-en/browse_thread/thread/ef024e92a41113a3/58f86e8deca2de4c?lnk=gst&q=memor

[jQuery] Re: Cleaning up javascript before ajax load

2009-07-01 Thread waseem sabjee
Been trying to replicate your situation. the best solution i see is to not load the variables. may be if you can explain your environment in more detail. like : this is how I understand. lets assume we have our container within this container we have out element we basically loading the full

[jQuery] Re: Cleaning up javascript before ajax load

2009-07-01 Thread Veeru
anybody??

[jQuery] Re: Cleaning up javascript before ajax load

2009-06-30 Thread Veeru
In my case, the ajax page, has events and js attached to it - The events and the js are necessary for the loaded page to display and behave properly. Is'nt there a better way to remove the events and js from memory just before i want to execute another ajax request than to identify each variable/e

[jQuery] Re: Cleaning up javascript before ajax load

2009-06-30 Thread waseem sabjee
well if the js from that page is in the head tag you can extract everything from in-between the body tags and leave out the js another way would be to cycle through each element - and do not take across any script tags. If that js executes it will be held in the memory. On Tue, Jun 30, 2009 at 1