-
Jun 27th, 2006, 01:17 PM
#1
[RESOLVED] watch() on an input element's value?
Okay, I need to know when something is pasted or deleted in a text field by way of the context menu. So I figured I'd use the watch() method on the text field for the value property. But the text field doesn't support the watch method.
Does anybody know of a way to accomplish what I want?
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jun 27th, 2006, 03:12 PM
#2
Re: watch() on an input element's value?
Try onChange. watch() is meant for variables rather than element properties/values.
-
Jun 28th, 2006, 03:52 AM
#3
Re: watch() on an input element's value?
Unfortunately onChange won't work in my case. onChange only seems to fire when the field loses focus, and I need to know that the change is occuring as it is occuring, not after the fact.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jun 28th, 2006, 02:43 PM
#4
Re: watch() on an input element's value?
That's about as far as you can get with javascript. Reminds you of women doesn't it?
Do you have control over the context menu's javascript? If so, you can populate the textbox and then call your function.
Alternately, have a timer function which constantly polls the textbox, grabs the value and compares it with the next value.
-
Jun 29th, 2006, 08:57 AM
#5
Re: watch() on an input element's value?
-
Jun 29th, 2006, 09:56 AM
#6
Re: watch() on an input element's value?
onkeyup, and onmousedown combined, should cover it.
-
Jun 30th, 2006, 08:12 AM
#7
Re: watch() on an input element's value?
Actually I just found out about the onPropertyChange event which seems to work. Its IE specific I think, but this is for an intranet app, so the client is guarunteed to be IE.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|