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

Foil 17 JavaScript Entities in 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
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 Wed Feb 19 1997