spacer

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

home / experts / javascript / column29


The Vertical Positioning Function

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

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, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business


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

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