Variable problem

This is a discussion on "Variable problem" within the JavaScript Forum section. This forum, and the thread "Variable problem are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 11th, 2007, 08:22
New Member
Join Date: Apr 2007
Location: fgfgf
Age: 32
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Variable problem

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}

return totaloffset;
}

What i do not understand is why parentEl suddenly become NULL

Can someone explain what is
offsetParent
Reply With Quote

Reply

Tags
variable

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem for good specialist - variable changing by itself. EddyInTheSky JavaScript Forum 2 Mar 11th, 2008 12:28
is this variable right? geyids PHP Forum 4 Aug 6th, 2007 21:45
Another Variable problem VanderBOOM JavaScript Forum 2 Nov 16th, 2006 17:25
Problem transmitting variable to mysql masonbarge PHP Forum 2 Oct 24th, 2006 12:02
problem with Session variable andrew_perez5 Classic ASP 0 Jan 24th, 2005 03:42


All times are GMT. The time now is 10:40.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43