Basic HTML version of Foils prepared June 30 1996

Foil 75 Example of Clicking on a Form - I

From A Tutorial on Base Web Technologies CRPC Annual Meeting/NASA Langley/Trip to China -- May 14-17 June 10-13 1996 July 12-18 1996. by Geoffrey Fox


1 <HTML><HEAD><TITLE>Javascript with Forms</TITLE>
2 <SCRIPT LANGUAGE="JavaScript" >
3 <!-- A Conventional comment to hide JavaScript from old browsers
4 function compute(form) {
5 if( confirm("Is this what you want?"))
6 form.result.value = eval(form.expr.value);
7 else alert("Enter a new expression then!"); }
8 //scriptend-->
9 </SCRIPT></HEAD>
10 <BODY><FORM>
11 Enter An Expression:
12 <INPUT TYPE="text" NAME="expr" SIZE=15>
13 <INPUT TYPE="button" VALUE="DoIt!" ONCLICK="compute(this.form)">
14 <BR>Result:
15 <INPUT TYPE="text" NAME="result" SIZE=15>
16 <BR>
17 </FORM></BODY></HTML>

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 Sun Dec 14 1997