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() {
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!!

You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to