Click to See Complete Forum and Search --> : Scroll to particular XML node
nitin.randive
May 13th, 2008, 02:20 AM
Hi Gurus !
(Safari User)
I want to scroll my DIV to a particular location of a XML node inside the div.
Can anyone help me for the above.
Thanks !
nitin.randive
May 13th, 2008, 05:39 AM
For proper refernce
Please see my page
( Use Safari Browser )
http://58.68.117.35/crickler/main.php
Click on "Play Game"..there you wud see the at the top numbered circles
Those circles focus on the particular question but the question is not scrolled and flashed at top
I want to scroll it to top
Please help..urgent !
PeejAvery
May 13th, 2008, 08:17 AM
Why don't you just get the position of the element and then set the scrollTop to that position?
function getPosition(obj) {
if (obj.offsetParent) {
x = obj.offsetLeft;
y = obj.offsetTop;
while (obj = obj.offsetParent) {
x += obj.offsetLeft;
y += obj.offsetTop;
}
}
}
nitin.randive
May 27th, 2008, 03:15 AM
Hi Peej !
Excellent !
thanks a lot !
Sorry for replying late..was busy with some other stuff..
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.