W
Wayne Sepega
Ultimately what I need is a way to remember the scroll position of the form
on a post back. I have a button that posts back to the current form and if
there are no errors the form is reproduced, I want to scroll back to where
the user was when they clicked on the button.
I have an ASPX page with the following doc type:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd" >
I'm not a 100% sure what all the above means, though I do know (from help
with a co-worker) that it determines how the document is generated on the
client side. I have to leave the doc type that way for our standards, but
still need to do the following.
I have the following JAVASCRIPT in the same page:
alert("You've scrolled to " + document.body.scrollTop + " pixels.");
With the doctype tag I always receive 0 for the value, but if I remove the
doctype tag or set it to a different type, I receive the correct value. Is
there an equivalent of scrollTop in the above doc type?
Any help or points in the right direction are appreciated.
Thanks
Wayne
on a post back. I have a button that posts back to the current form and if
there are no errors the form is reproduced, I want to scroll back to where
the user was when they clicked on the button.
I have an ASPX page with the following doc type:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd" >
I'm not a 100% sure what all the above means, though I do know (from help
with a co-worker) that it determines how the document is generated on the
client side. I have to leave the doc type that way for our standards, but
still need to do the following.
I have the following JAVASCRIPT in the same page:
alert("You've scrolled to " + document.body.scrollTop + " pixels.");
With the doctype tag I always receive 0 for the value, but if I remove the
doctype tag or set it to a different type, I receive the correct value. Is
there an equivalent of scrollTop in the above doc type?
Any help or points in the right direction are appreciated.
Thanks
Wayne