Click to See Complete Forum and Search --> : How can I disable mouse events after an event?


mitya
10-01-2003, 05:25 AM
Hi all, first post.

I'm new to javascript, though I'm a PHP/AS coder and know what I want my java to do.

I have a bit of text which, onClick, populates a form field. However, if the user chooses to delete that bit of text (which represents a client from a list of clients) obviously I don't want that text to do anything anymore when clicked.

I can make it *look* like it's vanished, i.e. by changing the span colour, but any mouse events are still active. Is there a way to die() all further functions or disable specific ones?

I hope this makes sense- thanks in advance.

Charles
10-01-2003, 05:30 AM
Just add to the handler this.onclick = function () {}.

mitya
10-01-2003, 06:00 AM
THanks for that, that's great.

lacroix13
05-27-2005, 08:36 AM
another way is to set the following on the text field

onFocus=this.blur();