spacer

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

home / experts / javascript / column29


The Vertical Positioning Function

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

DOCJSLIB Version 2.0 supported the setPosFromLeft() function for horizontal positioning. Version 3.0 adds a matching function, setPosFromTop():

function docjslib_setPosFromTop(id, yCoord) {
  if (NS4) {eval("document." + id).top = yCoord}
  else {eval("document.all." + id).style.top = yCoord}
}

This functions has two parameters:

  • id: The element ID, specified by function's caller.
  • yCoord: The distance between the element's top edge and the window's top edge.

As previously explained in this and previous columns, top is a property of the DHTML element on Netscape Navigator, but it is a property of the style object on Internet Explorer.

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


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

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