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

Foil 61 JavaScript Link Example

From Feb 17/19 Delivered Lecture for Course CPS616 -- aJavaScript Language Objects and Frames CPS616 spring 1997 -- Feb 17 and 19 1997. by Geoffrey Fox * Important Information in IMAGE
Secs 67.6
<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 Fri Feb 21 1997