HELP! * YELLOW=global GREY=local Global HTML version of Foils prepared 21 February 97

Foil 10 Example of Clicking on a Form - I

From Feb 12 Delivered Lecture for Course CPS616 -- Basic JavaScript Functionalities and Examples CPS616 spring 1997 -- Feb 12 1997. by Geoffrey Fox * Critical Information in IMAGE
Secs 152.6 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 Fri Feb 21 1997