The following example illustrates some simple form elements with onFocus and onClick event handlers: |
<form> |
<input type="text" name="data" size=30 |
onFocus="window.status='this is a test of onFocus'; return true"> |
<input type="submit" value="clickit!" onClick="top.dosomething('This is a test of onClick')"> |
</form> |
window.status is a property holding message at bottom of browser window |
One would typically have onChange handler as well in text field. Note that with these handlers one does NOT necessarily need server-side CGI script to process form |