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

Foil 22 JavaScript Entities in HTML

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 273.6 Addon
One can parameterize HTML using document.write(ln) commands such as:
document.writeln("string1" + JSvariable +"string2"); // etc.
A "lighter weight way of achieving this can be illustrated by direct HTML syntax with NO <SCRIPT> tag and no document.write
<IMG WIDTH="&{JSvar1};" SRC="&{JSvar2};" >
where JSvar1 and JSvar2 are JavaScript variables holding width and URL of image
Syntax is modeled on that for for special characters
  • &GT; is > etc.
Such JavaScript Entities can ONLY appear on RIGHT HAND side of attribute values
  • Cannot appear in HTML text such as titles.
  • document.writeln approach has no such restriction!


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