Basic HTML version of Foils prepared 23 June 1997

Foil 60 JavaScript Form Example

From JavaScript Tutorial for Certificate Course UC Web applications Certificate -- Summer 97. by Geoffrey C. Fox, Tom Scavo


1 The following example illustrates some simple form elements with onFocus and onClick event handlers:
2 <form>
3 <input type="text" name="data" size=30
4 onFocus="window.status='this is a test of onFocus'; return true">
5 <input type="submit" value="clickit!" onClick="top.dosomething('This is a test of onClick')">
6 </form>
7 window.status is a property holding message at bottom of browser window
8 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

in Table To:


Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Wed Apr 1 1998