HELP! * GREY=local LOCAL HTML version of Foils prepared 15 January 1997

Foil 10 Example of Clicking on a Form - I

From JavaScript Tutorial for CPS616 Technologies of the Information Age 1997 Basic Information Track of CPS -- Spring Semester 97. by Geoffrey C. Fox * Critical Information in IMAGE
Addon
<HTML><HEAD><TITLE>Javascript with Forms</TITLE>
<SCRIPT LANGUAGE="JavaScript" >
<!-- A Conventional comment to hide JavaScript from old browsers
function compute(form) {
if( confirm("Is this what you want?"))
form.result.value = eval(form.expr.value);
else alert("Enter a new expression then!"); }
//scriptend-->
</SCRIPT></HEAD>
<BODY><FORM>
Enter An Expression:
<INPUT TYPE="text" NAME="expr" SIZE=15>
<INPUT TYPE="button" VALUE="DoIt!" ONCLICK="compute(this.form)">
<BR>Result:
<INPUT TYPE="text" NAME="result" SIZE=15>
<BR>
</FORM></BODY></HTML>



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 Sat May 24 1997