hey guys,
just trying to wrap my head around javascript this week and came across something I need some help with understanding.
lets say I have a simple script:
[code=html]<form name=”jim”>
name: <input type=”text” name=”fname” size=”10″ onChange=”alert(‘hi’);”>
<a href=”#” onClick=”document.jim.fname.value=’jim’;”> CLICK ME! </a>
</form>
now what that does… when you click on the CLICK ME link it puts the string “jim” in the text box’s value field.
well what I’m trying to figure out is when the string gets the value “jim” or whatever I want the alert box to come up.
so the flow would be: user clicks link, value of text field is now “jim”, since the text field went from blank to now holding “jim” pop up the alert box.
I’ve tried every event type I could find but it doesn’t seem to work. am I missing something? I realize that changing the value doesn’t really mean its an event so to say.
thanks~!