Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > onscroll Event Not Firing in ASP.NET 2.0

Reply
Thread Tools

onscroll Event Not Firing in ASP.NET 2.0

 
 
Sam
Guest
Posts: n/a
 
      09-29-2006
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?

 
Reply With Quote
 
 
 
 
q
Guest
Posts: n/a
 
      09-29-2006
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?


 
Reply With Quote
 
 
 
 
IT Guy
Guest
Posts: n/a
 
      09-29-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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?

>



 
Reply With Quote
 
 
 
Reply

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Opera & onscroll event. Yansky Javascript 0 06-26-2007 08:09 AM
SOLUTION: Body onscroll, scrollTop, scrollLeft not working with master pages ??? bluegrasslover@gmail.com ASP .Net 0 11-25-2006 01:59 AM
SOLUTION: Body onscroll, scrollTop, scrollLeft not working with master pages ??? bluegrasslover@gmail.com ASP .Net 0 11-25-2006 01:59 AM
Body onscroll, scrollTop, scrollLeft not working with master pages ??? gregtyndall@gmail.com ASP .Net 0 12-29-2005 04:39 PM
onscroll event in iframe in IE lorinho Javascript 2 06-27-2005 10:36 PM



Advertisments