Hey Brent,

      Do you have a demo page that displays this issue?  My only
thoughts are that the elements are getting reloaded in the DOM yet not
getting the events attached.

--

http://positionabsolute.net



On Apr 29, 2:59 pm, BrentNicholas <brentnicho...@gmail.com> wrote:
> Hi all,
>
> So I posted about this before but am still having troubles with
> Event.observe flaking out on me after a period of time.
>
> Here's the situation:
>
> The page runs and init's the app with:
>          document.observe("dom:loaded", init);
>
> init() fires off: getSelectsForm()
>
> As you can see (below) it loads a page and attaches some observers,
> the page loaded only has three buttons on it (as seen in the
> Event.observe code). They are not of the same names or id's, but do
> share the same css class names. Nothing else is loaded.
>
> Now if I click any button right away things work just fine (List Page,
> Add Page). If I wait about 5 minutes (not pressing any buttons first
> after load) the 'buttonGetProjectsList' will not seem to fire the
> 'getProjectsList' function as registered through the observer. However
> the button 'buttonAddProjectForm' will fire off the 'addProject'
> function. Even if you start using the page right away (everything
> works), then wait 5 minutes, the list button will not work but the
> others will.
>
> The pages loaded by these button do not have any elements of the same
> name or id on them that the ''dsp_ProjSelects.cfm' file had. So there
> should not be any naming conflicts.
>
> Any thoughts on this? I've taken the application and stripped in down
> to just what's needed in a test area and I'm still getting the
> trouble.
>
> function getSelectsForm()
> {
>         new Ajax.Request('dsp_ProjSelects.cfm?'+cfSession,
>       {
>         method: 'get',
>         onSuccess: loadSelectsForm,
>                 onComplete: attachSelectsFormObservers,
>         onFailure: function(r) {
>           throw new Error( r.statusText );
>         }
>       }
>          );
>
> }
>
> function loadSelectsForm(transport)
> {
>         var htmlBlock = transport.responseText;
>         Element.update(idSelectsDIV,htmlBlock);
>         Form.focusFirstElement('SELECT_FORM');
>
> }
>
> function attachSelectsFormObservers()
> {
>         Event.observe('buttonGetProjectsList','click', getProjectsList,
> false);
>         Event.observe('buttonAddProjectForm','click', addProject, false);
>         Event.observe('buttonClearForm','click', clearSelectsForm, false);
>
> }
>
> Also, environment:
> Win XP (all patches)
> IE 6.0.2900.2180.xpsp.080413-2111
>
> Thanks for your time and effort.
>
> Brent
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to