spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column78


Netscape 6, Part VII: Object-Oriented DOCJSLIB 3.1

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

IE 5.x Subclass Object Listing

<!--
function docjslibIE5SubClass() {
  this.inheritFrom = docjslibSuperClass;
  this.inheritFrom();
  
  this.getSrc = getSrcMethod;
  this.setSrc = setSrcMethod;
  this.setPosFromLeft = setPosFromLeftMethod;
  this.setPosFromTop = setPosFromTopMethod;
  this.setZposition = setZpositionMethod;
  this.setVisibility = setVisibilityMethod;
  this.doThisCommandEveryIntervalMS = doThisCommandEveryIntervalMSMethod;
  this.getWindowWidth = getWindowWidthMethod;
  this.getWindowHeight = getWindowHeightMethod;
  this.getPageScrollLeft = getPageScrollLeftMethod;
  this.getPageScrollTop = getPageScrollTopMethod;
  this.findHighestZ = findHighestZMethod;

  function getSrcMethod(id) {
    return document.getElementById(id).src;
  }

  function setSrcMethod(id, url) {
    document.getElementById(id).src = url;
  }
  
  function setPosFromLeftMethod(id, xCoord) {
    document.getElementById(id).style.left = xCoord;
  }
  
  function setPosFromTopMethod(id, yCoord) {
    document.getElementById(id).style.top = yCoord;
  }

  function setZpositionMethod(id, z) {
    document.getElementById(id).style.zIndex = z;
  }
  
  function setVisibilityMethod(id, flag) {
    var str = (flag) ? 'visible' : 'hidden';
    document.getElementById(id).style.visibility = str;
  }

  function doThisCommandEveryIntervalMSMethod(command, interval) {
    setInterval(eval('"' + command + '"'), interval);
  }

  function getWindowWidthMethod() {
    return document.body.clientWidth;
  }

  function getWindowHeightMethod() {
    return document.body.clientHeight;
  }

  function getPageScrollLeftMethod() {
    return document.body.scrollLeft;
  }

  function getPageScrollTopMethod() {
    return document.body.scrollTop;
  }
  
  function findHighestZMethod() {
    var documentDivs = new Array();
    document.divs = document.getElementById("DIV");
    var highestZ = 0;
    for (var i = 0; i < documentDivs.length; i++) {
      var zIndex = documentDivs[i].style.zIndex;
      highestZ = (zIndex > highestZ) ? zIndex : highestZ;
    }
    return highestZ;
  }
}
// -->

Next: Netscape 6 subclass object listing

http://www.internet.com

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint


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

URL: http://www.webreference.com/js/column78/8.html