search for: unloadcach

Displaying 8 results from an estimated 8 matches for "unloadcach".

Did you mean: unloadcache
2006 Feb 01
2
IE memory fix leak.
By default the prototype.js gives us the function /* prevent memory leaks in IE */ Event.observe(window, ''unload'', Event.unloadCache, false); But there is no unload event in out application as the content of the div keeps changing using the Ajax.Updater function. To handle such a scenario, we''ve added the following lines of code to prototype.js /* prevent memory leaks in IE */ Event.observe(window, ''u...
2006 Jan 18
2
Event.stopObserving and anonymous functions
...all the observers before I lose them. Unfortunately, the Event.observe calls were written as inline anonymous functions so, when calling Event.stopObserving, I'm supposed to pass in a reference to the observer function, but it isn't able to be referenced as far as I know. I'd use Event.unloadCache() as a brute-force solution, but there are a ton of other observers for other areas of the page that would all have to be re-created. Is there a way around this (keeping the 'observers' as anonymous functions), or a better way to approach this? (Why do these things always crop up the nig...
2006 May 09
5
anyone used the new firefox leak monitor?
One of the Mozilla developer released a new extension to detect JS memory leaks: https://addons.mozilla.org/firefox/2490/ If it''s accurate, it might be bad news for Prototype. I have some code using prototype 1.4 with no leaks, but other code with 1.5 leaks on every single bindAsEventListener call, and a bunch of other places. Not sure if it''s just me; I may just be
2006 Jan 24
0
Safari problems w/ Effect.Appear and other effects
...isable(document.forms[''welcome2'']); new Effect.Opacity(''block'', { duration: 2.0, transition: Effect.Transitions.linear, from: 1.0, to: 0.5 }); } //Goes to php page, get txt status msg and passes it to the update function function Poll() { Event.unloadCache(); new Ajax.Request(''observer.php'', { method: "get", asynchronous: true, onComplete:function(request) {update(request.responseText);} }); } //Gets called by poll() to see if request is completed, if not it tries one more time var PollAtte...
2006 Jan 25
0
Making an unload event work with prototype
...e memory problems in IE, but I''m prepared to risk it until someone comes up with a better solution. $ diff -u prototype.js.1.4.0 prototype.js --- prototype.js.1.4.0 2006-01-25 16:48:43.575591720 +0000 +++ prototype.js 2006-01-25 16:45:59.765494640 +0000 @@ -1511,8 +1511,10 @@ unloadCache: function() { if (!Event.observers) return; for (var i = 0; i < Event.observers.length; i++) { - Event.stopObserving.apply(this, Event.observers[i]); - Event.observers[i][0] = null; + if (!(Event.observers[i][1]=="unload")) { + Event.stopObserving.apply...
2006 Feb 23
25
reloading fragments of pages
Hello, I have a treeview, that works with scriptaculous in order to load the nodes dynamically. I also have in the main part of the page, a table with the list of elements. The lists of elements can be drag-dropped on the treeview in order to move them around (they are also draggable on other parts of the page) I need though, to refresh the treeview to reflect changes when a folder was moved
2006 Dec 14
17
Should Event.stopObserving() remove itself from cache?
Just wondering why Event.stopObserving() doesn''t remove the itself from the Event.obervers array? Is there a reason for this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to
2006 Nov 30
12
Disable autocomplete (Ajax.Autocompleter) on the fly.
I''m sure there is an easy way to do this, but it is one of those things that is incredibly difficult to search for. How can I disable an ''Ajax.Autocompleter'' element from working ''on the fly''? I have a page where I''m using two (I know it''s crazy) Ajax.Autocompleter elements and once one of them has got a result I want the other field