well its not a version issue. I just copied the js files from to another to confirm and the issue still persists with dom:loaded
as far as timing goes the submit buttons I'm observing for clicks are static HTML elements. I had been assuming all static HTML is loaded upon dom:load (but admittedly I've never looked to confirm that it just seem to make sense =) This does bring into question in my mind the order of onclick vs. forum submission. right now the 2 buttons i've been testing this with submit a form when clicked. In FF I see the alert window telling me the 'click' observer is firing off before the form is getting submitted. in IE6 I see nothing so is there a possibility that the form is actually getting submitted before the 'click' observer fires off? Then again maybe I'm going about all of this the wrong way. what I'm shooting for here is to show a loading spinner on the page on each click of links and selected input buttons. hence the $$ ('a','.processing'). The site I'm working on has some AJAX and each AJAX request shows/hides a processing spinner. some of the bigger page requests and during peak times users are multi clicking buttons because they are looking for the AJAX processing spinner(even on non ajax requests) rather than watching the IE window and thinking nothing is going on. so what i sat out to do was simply show the processing spinner via each click of an anchor tag or button which has the .processing class attached to it. all it needs to do is .show() the spinner div onclick but i'd rather not have to go through each link and button to add onclick="$('spinner').show()". IE 6 is important because this runs in XPe terminals which of course are all running IE6 =) On May 22, 9:53 am, Walter Lee Davis <wa...@wdstudio.com> wrote: > You may find that you are using the same version on both sites, which > means that my solution fixed the problem, but not for the reason I > thought. > > There may be a timing/latency issue somewhere else in your code that > is resolved by the DOM being completely settled (onload is very late > in the game, the page is already visible in its entirety in the > browser). > > You might want to look through for some cases where you expect a thing > to be there -- if you act on any element blindly assuming its > existence -- and see if wrapping that up in a condition makes the site > work again under dom:loaded. > > It's just a hunch, mind you. > > Walter > > On May 22, 2009, at 9:58 AM, ykaerflila wrote: > > > > > That worked like a champ. I changed > > document.observe("dom:loaded", code.launch ); > > to > > Event.observe(window,'load', function(event){ > > $$('.processing').invoke('observe', 'click', function(ev) { > > alert('clicked'); > > }); > > }); > > > Now everything is working as expected. I'm using the same > > document.observer("dom:loaded"... in another script as I mentioned > > which is working properly( its only being used on checkboxes and divs) > > so now I'm curious heh. I was pretty sure I used the exact same > > version of prototype on the 2 sites, guess I'll go double check just > > to see. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---