This is probably easy, but i can not figure out how to do it. If i change the input field in the example and then click the button, only the onchange is executed. Why? How can i solve this? I want the onchange first executed and then the onclick.
<input type=button name=okButton value="OK" onclick="gotoOK()" >
<input type=text name=test value="" onchange="doUpdate()">