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

Foil 12 Example of Parameterized HTML

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 for Parameterizing HTML</TITLE>
<SCRIPT LANGUAGE="JavaScript" >
<!-- A Conventional comment to hide JavaScript from old browsers
var imagewidth=600; // These could be changed by form input or some
var imagefile="npac.gif"; // computation based on size of window etc.
//scriptend-->
</SCRIPT></HEAD>
<BODY> ......Bunch of Normal Stuff
<SCRIPT LANGUAGE="JavaScript" >
<!-- A Conventional comment to hide JavaScript from old browsers
document.writeln('<img align=top width=' + imagewidth + ' src="' + imagefile + '" >');
//scriptend-->
</SCRIPT>
.... Yet More Normal Stuff
</BODY></HTML>
Note single quotes used for JavaScript, Double quotes for HTML -- can use \' if necessary to hide special meaning from JavaScript



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 Feb 19 1997