views:

37

answers:

3

that doesn't involve catching key presses ?

A: 

Try using click maybe?

SquidScareMe
but I don't want it to fire onclick. I want it to fire when val has changed, and focus is not lost
NimChimpsky
+1  A: 

Not really. Using the key press and checking manually if there is a change is the standard workaround for IE6.

Sohnee
A: 

Start an interval timer and poll the input?

var myInput = document.getElementById('myId');
var lastvalue = myInput.value;

var timerID = setInterval( function() { 

    if (myInput.value !== lastValue) {

        // TODO call your "changed" method here

        lastValue = myInput.value;
    }

}, 100 );

What are you watching for that can happen that involves changing the input's value without keystrokes while it has focus? paste by mouse or menu? there might be events for those situations but I'm don't know any offhand.

edits: never mind all that. it looks like ie6 should support cut/copy/paste events on text inputs.

http://www.quirksmode.org/dom/events/cutcopypaste.html

lincolnk