Afternoon Guys / Gals ..

I'm having a slight headache with stop observing ....

i'll try to explain my code ...

upon click of an element (in this case a form submit) my javascript
goes through some calculations and if needed calls a function to
create an error message .. this function creates a fixed position div
ontop of the page with the error message inside it.

Now doing all this is fine but i need an
Event.observe(document,'click', function() {
    removeTheElementIJustAdded();
}
on the end of it .....

this also works well and fine BUT !! .... do i need to stop observing
the document click else it will try to call that function every
time? ....

P.S i cannot stop all click observers because i have more on the page
that i need to listen to ....


All i want to do is simple .. create the div (done) and watch for a
click event on the entire document that removes it

but it seems to be a bit headachy for me for some reason.!!! - i think
its due to me not wanting to have multiple Event.observe;s created!!

Regards
Alex
--~--~---------~--~----~------------~-------~--~----~
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