View Full Version : onTextChange?

05-04-2004, 01:05 AM
in visual basic you have a Text1_Change declaration in every text box
in java you have onMouseOver to detect when the mouse moves over an object

what is the "onTextChange" code in java? i mean, what can i use to detect when the text has changed in an input box?

05-04-2004, 02:40 AM
you could use onkeypress...

http://www.w3schools.com/dhtml/dhtml_events.asp and browse to the talbe called "HTML 4.0 Event Handlers" for a list of events.

05-04-2004, 04:44 AM
<input type="text" name="mytext" onchange="alert('The text has changed!')" />

onchange is invoked after the field has lost focus and the text has changed.