Netscape 6, Part VII: Object-Oriented DOCJSLIB 3.1: Browser-Independent Superclass Object Listing - Doc JavaScript | WebReference

Netscape 6, Part VII: Object-Oriented DOCJSLIB 3.1: Browser-Independent Superclass Object Listing - Doc JavaScript


Netscape 6, Part VII: Object-Oriented DOCJSLIB 3.1

Browser-Independent Superclass Object Listing

<!--
// docjslib version 3.1. Released February 25, 2001.
// This is docjslib library. 
// docjslib is a cross-browser library. You should not worry about the browser in your code.
function docjslibSuperClass() {
  this.makeImage = makeImageMethod;
  function makeImageMethod(imgID,          // given id
                   imgURL,         // image URL
                   imgHeight,      // image height
                   imgWidth,       // image width
                   imgAlt,         // alternative image
                   posFromLeft,    // absolute position from left of window
                   posFromTop,     // absolute position from top of window
                   clickParam1,    // parameter passed to "onclick" handler
                   clickParam2)    // parameter passed to "onclick" handler
  {
    document.write(
    '<STYLE TYPE="text/css">',
    '#', imgID, ' {',
      'position: absolute;',
      'left: ', posFromLeft, ';',
      'top: ', posFromTop, ';',
      'width: ', imgWidth, ';',
      'z-index: 1',
    '}',
    '</STYLE>',
    '<DIV ID="', imgID, '">',
    '<A HREF="javascript:', "handleImageClick('", imgID, "'", ',', clickParam1, ',', 
    clickParam2, ')">',
    '<IMG NAME="', imgID, 'img" ID="', imgID, 'img" SRC="', imgURL, '" ALT="', imgAlt, 
    '" BORDER="0" ', 'HEIGHT="', imgHeight, '" WIDTH="', imgWidth, '">',
    '</A></DIV>'
    );
  }
}
//
// End docjslib Version 3.1
//
// -->

Next: Internet Explorer 5.x subclass object listing

https://www.internet.com


Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: February 26, 2001
Revised: February 26, 2001

URL: https://www.webreference.com/js/column78/7.html