davidlars99 Login Name
Limited Member Account Type
351,883 Expert Points
04/13/04 Registration Date
0 Points this month
Expert Certifications:
davidlars99 has earned the following certifications.
Member Profile:
- Have you heard about the object-oriented way to become wealthy?
- No...
- Inheritance...

davidlars99 {at} gmail {dot} com

A little boy goes to his father and asks, "Daddy how was I born?"
The father answers: "Well son, I guess one day you will need to find out anyway!  Your Mom and I first got together in a chat room on Yahoo. Then I set up a date via e-mail with your Mom and we met at a cyber-cafe.  We sneaked into a secluded room, where your mother agreed to a download from my hard drive.  As soon as I was ready to upload, we discovered that neither one of us had used a firewall, and since it was too late to hit the delete button, nine months later a little Pop-Up appeared that said: YOU GOT MALE!

Many developers are wondering how to get an absolute XY position of a non-absolute HTML element:
// function
function getElementXY(obj)
{
       var offsetObj=document.getElementById(obj);
       var offsetX=0;
       var offsetY=0;
       while (offObj)
       {
              offsetX+=offsetObj.offsetLeft;
              ofsetfY+=offsetObj.offsetTop;
              offsetObj=offsetObj.offsetParent;
       }
       if (navigator.userAgent.indexOf("Mac")!=-1&&typeof document.body.leftMargin!="undefined")
       {
              offsetX+=document.body.leftMargin;
              offsetY+=document.body.topMargin;
       }
       return {left:offsetX,top:offsetY};
}

// usage
var element=getElementXY("myObjectID");

alert(element.left);  
alert(element.top);
 
812 Questions Participated In
4,214 Comments Posted
Date Points Title Activity Type Status Zone
04/23/09 500 Changing ANSI_NULLS option … Comment PAQ MS SQL Server
03/04/09 500 css float property makes pare… Comment PAQ CSS
02/10/09 500 pagination styling Comment PAQ CSS
10/15/08 0 where is that magic client certi… Comment Deleted:Forced Web Services and…
09/09/08 500 Regex for complex path Comment PAQ JavaScript
 
422 Questions Asked
0 Questions Open
320 Questions Graded
102 Questions Deleted
 
0 Articles Written
0 Article Comments