onscroll Event Not Firing in ASP.NET 2.0

Discussion in 'ASP .Net' started by Sam, Sep 29, 2006.

  1. Sam

    Sam Guest

    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?
     
    Sam, Sep 29, 2006
    #1
    1. Advertising

  2. Sam

    q Guest

    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?
     
    q, Sep 29, 2006
    #2
    1. Advertising

  3. Sam

    IT Guy Guest

    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" <> wrote in message
    news:...
    > 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?

    >
     
    IT Guy, Sep 29, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    5,968
  2. Replies:
    0
    Views:
    704
  3. Replies:
    0
    Views:
    1,172
  4. lorinho

    onscroll event in iframe in IE

    lorinho, Jun 26, 2005, in forum: Javascript
    Replies:
    2
    Views:
    245
    lorinho
    Jun 27, 2005
  5. Yansky

    Help with Opera & onscroll event.

    Yansky, Jun 26, 2007, in forum: Javascript
    Replies:
    0
    Views:
    209
    Yansky
    Jun 26, 2007
Loading...

Share This Page