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

Foil 59 JavaScript Link Example

From JavaScript Tutorial for CPS616 Technologies of the Information Age 1997 Basic Information Track of CPS -- Spring Semester 97. by Geoffrey C. Fox * Important Information in IMAGE

<a href="" onClick="top.seturl(this,'nextitem27.html')" onMouseOver="window.status='this is a Test of onMouseOver'; return true">Exciting Item 27</a>
Note this very typical use of onCLick in <a > link.
this is current link and of object type location.
set href to be anything including "" -- don't leave out otherwise won't be a link -- will be anchor instead -- this insures that link blue!
set href and target frame in onClick Event handler
This is is how you get indices to work
  • put seturl in top document defining frames
  • <a > links are in index frame and onClick there allows seturl to load required document into mainframe -- the main display frame
function seturl(linkname,fileurl) {
linkname.target="top.mainframe";
linkname.href = fileurl); }



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