ASP.NET DOCTYPE Declaration prevents us to use document.body.scrollTop

Last post 07-01-2008 7:34 AM by NC01. 4 replies.

Sort Posts:

  • ASP.NET DOCTYPE Declaration prevents us to use document.body.scrollTop

    03-22-2007, 4:56 PM
    • Member
      3 point Member
    • fahadash
    • Member since 03-22-2007, 8:47 PM
    • Posts 3

    Hi,

    I dont have an idea why Microsoft people could be very stupid to leave potholes in their products that prevents our solutions to work.

     

    Everything was fine before our visitors have installed IE 7. Now with the following DOCTYPE, IE7 returns zero in document.body.scrollType.

     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

     

    My question is, How do I force ASP.NET not to send doctype ?

     

    I really want Microsoft guys to launch WSYP release (dont know what it is ?? see this http://www.youtube.com/watch?v=ry7u6JF_B1c ) 

    Thanks,

    Fahad 

  • Re: ASP.NET DOCTYPE Declaration prevents us to use document.body.scrollTop

    03-22-2007, 10:14 PM
    Answer
    • Star
      13,648 point Star
    • cathal
    • Member since 06-18-2002, 4:02 PM
    • Belfast, Northern Ireland
    • Posts 2,702
    • TrustedFriends-MVPs

    I suspect your problem is with xhtml rendering rather than the doctype. Take a look at http://msdn2.microsoft.com/en-us/library/ms228268.aspx , and try adding the xhtmlConformance node to your web.config and setting it to legacy.

    Cathal

  • Re: ASP.NET DOCTYPE Declaration prevents us to use document.body.scrollTop

    03-22-2007, 11:12 PM
    Answer
    • Star
      13,726 point Star
    • JoshStodola
    • Member since 01-16-2007, 9:17 AM
    • Heartland of America
    • Posts 3,177

    Hi Fahad,

    Stop bad-mouthing MicrosoftAngry  If you dont like their products, then go code JSP and Servlets and enjoy pulling your hair out.

    In the meantime, use the syntax as provided by W3C documentation (you know, those guys who created the doctype you are using):  

        document.documentElement.scrollTop;
     

    Have a nice day...

    Josh Stodola ← Come check out my blog!
  • Better than scrollTo

    07-01-2008, 7:26 AM
    • Member
      2 point Member
    • i02guruc
    • Member since 07-01-2008, 11:23 AM
    • Posts 1

    Isn't neccesary to use scrollTo in ASP.NET.

    Click in the link above:

    http://www.dotnetjunkies.com/Article/5E94AB64-5CA3-4487-8678-2853E3EF850D.dcik

    Regards,

  • Re: Better than scrollTo

    07-01-2008, 7:34 AM
    • All-Star
      74,705 point All-Star
    • NC01
    • Member since 08-26-2005, 7:33 PM
    • Posts 13,868
    • TrustedFriends-MVPs

    i02guruc:

    Isn't neccesary to use scrollTo in ASP.NET.

    Click in the link above:

    http://www.dotnetjunkies.com/Article/5E94AB64-5CA3-4487-8678-2853E3EF850D.dcik

    Regards,

    Please don't bring up posts that are over a year old. Besides scrollTo is NOT an ASP.NET function/property. It is a DOM client-side property (JavaScript) and has absolutely nothing to do with .NET

    NC...

     

Page 1 of 1 (5 items)