Introducing DOCJSLIB 3.0, The Linked Image Model: External View - Doc JavaScript | WebReference

Introducing DOCJSLIB 3.0, The Linked Image Model: External View - Doc JavaScript


The Linked Image Model: External View

Version 2.0 includes a DHTML element model that is built out of an <IMAGE> tag, which is positioned within an <A> tag, which in turn is positioned within a <DIV> tag. This model, which we introduced in our previous column, Introducing DOCJSLIB, A Cross-Browser JavaScript Library, supported mouse clicks within the image area.

In this column, we introduce a related, simpler DHTML element model, the Linked Image. It consists of the same HTML tag structure as the Clicked Image above (<DIV>/<A>/<IMAGE>), except that the outcome of the clicking is not programmable. The Linked Image is a simple link which opens the prespecified URL upon clicking the image. The Clicked Image, on the other hand, lets you define the handler of the clicking event. One of the popular event handlers is to open a prespecified URL. The Linked Image Model is a packaging of such an event handler. It eliminates the need to program the general event handler.

The DOCJSLIB Linked Image Model is created by calling the makeLinkedImage() function. Its definition reveals the image's parameters that you can control:

http://www.internet.com


Created: November 9, 1998
Revised: November 9, 1998

URL: http://www.webreference.com/js/column29/linkedimageout.html