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.
|
|
|
|
|
![]() |
||
Variable problem
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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 |
|
|
![]() |
| Tags |
| variable |
| Thread Tools | |
|
|
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 |