Click to See Complete Forum and Search --> : Disable selection everywhere without inputs?


ProfEich
08-11-2003, 07:43 PM
Hi!
I've disabled selection on my Homepage with:

document.onselectstart=new Function ("return false")

It works well. But now I've an edit-field created with <input type="text"> and I can't select something in it.

How can I enable selection for input´s like this and disable it for everything else?

ibidris2003
08-12-2003, 05:09 AM
Use onselecthandlers for each element. Write separate functions for input and non input elements.

http://galileo.spaceports.com/~ibidris/