By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,917 Members | 1,313 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,917 IT Pros & Developers. It's quick & easy.

onscroll Event Not Firing in ASP.NET 2.0

P: n/a
Sam
While attempting to get my floating toolbar to work in ASP.NET 2.0, I
noticed that the onscroll event is not firing. I've specified this on
the BODY tag, as always.

After some testing, I realized that the new DocType being used in 2.0
(<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">) is the
culprit.

Upon using the old 1.1 DocType (<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.0 Transitional//EN" >) the onscroll event began firing again.

I've read that the new doctype really should be used, but I can't seem
to find any workarounds when using the new one.

Anyone else having this problem?

Sep 29 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
q
The DOCTYPE is for XML (XHTML is a type of XML) and has absolutely
nothing to do with ASP.NET in any way shape or form. If you use it,
you have stronger rules to apply. Make sure you run your output
through an XHTML validator. As programmers we must obey the specs,
even if things seem to work perfectly. So, it's not that one is 1.1
and the other is 2.0.

You're going to have to paste some code. What do you mean it's on
<body"as always"? That means we have to compare that to something...
what are we comparing it to? Like I say XHTML has more rules to help
keep us in line (the point of rules!) So, while HTML didn't care about
anything and was an environment for complete and utter anarchy, XHTML
grants us a level of control and elegance. You're breaking a rule
somewhere...

Sam wrote:
While attempting to get my floating toolbar to work in ASP.NET 2.0, I
noticed that the onscroll event is not firing. I've specified this on
the BODY tag, as always.

After some testing, I realized that the new DocType being used in 2.0
(<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">) is the
culprit.

Upon using the old 1.1 DocType (<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.0 Transitional//EN" >) the onscroll event began firing again.

I've read that the new doctype really should be used, but I can't seem
to find any workarounds when using the new one.

Anyone else having this problem?
Sep 29 '06 #2

P: n/a
It appears that when I use the XHTML doctype, the BODY tag does not expose
an onscroll event. When using the other doctype I mentioned, the onscroll
event is valid on the BODY tag and fires when appropriate.
"q" <ag******@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
The DOCTYPE is for XML (XHTML is a type of XML) and has absolutely
nothing to do with ASP.NET in any way shape or form. If you use it,
you have stronger rules to apply. Make sure you run your output
through an XHTML validator. As programmers we must obey the specs,
even if things seem to work perfectly. So, it's not that one is 1.1
and the other is 2.0.

You're going to have to paste some code. What do you mean it's on
<body"as always"? That means we have to compare that to something...
what are we comparing it to? Like I say XHTML has more rules to help
keep us in line (the point of rules!) So, while HTML didn't care about
anything and was an environment for complete and utter anarchy, XHTML
grants us a level of control and elegance. You're breaking a rule
somewhere...

Sam wrote:
>While attempting to get my floating toolbar to work in ASP.NET 2.0, I
noticed that the onscroll event is not firing. I've specified this on
the BODY tag, as always.

After some testing, I realized that the new DocType being used in 2.0
(<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">) is the
culprit.

Upon using the old 1.1 DocType (<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.0 Transitional//EN" >) the onscroll event began firing again.

I've read that the new doctype really should be used, but I can't seem
to find any workarounds when using the new one.

Anyone else having this problem?

Sep 29 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.