473,811 Members | 3,135 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

onscroll Event Not Firing in ASP.NET 2.0

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.dt d">) 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
2 2168
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.dt d">) 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
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.goo glegroups.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.dt d">) 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
10489
by: viza | last post by:
Hi! I use the onscroll event to make something like the CSS position:fixed; for MSIE. In MSIE/5.5, before a function is assigned to the event handler, it has the value null. In Opera, it is undefined, because Opera doesn't support this event. I use:
1
3414
by: Mark Szlazak | last post by:
Is there a way to detect if an textarea onscroll event is working in Firefox (or Mozilla). I know that there is an onscroll event bubbling bug with current vesions of these browsers so I want to detect this problem with a test like "if (textarea.onscroll == 'undefined' || !textarea.onscroll) {}." Any help would be appreciated.
2
6614
by: lorinho | last post by:
Alright, I'm stumped. Per this article from Microsoft I should be able to capture the onscroll event for an iframe but for some reason it doesn't seem to be working for me... http://msdn.microsoft.com/library/en-us/dnwebteam/html/webteam02052001.asp?frame=true#scrolling Has anyone made this work successfully before?
1
12911
by: Simon Wigzell | last post by:
Firefox has strange behaviour with onscroll. I have a sample page here: http://www.dynamicwebsitesystems.com/ScrollTest.htm If I make this the startup page for the firefox browser or launch it from Frontpage with Preview then the onscroll works - it calls the doOnScroll function and posts the alert when you move the scroll bar. It doesn't work if you go to this page from another page or if you refresh the page. What is going on here? Any...
0
2738
by: gregtyndall | last post by:
I have a weird problem. I'm using a master page to hold a menu that I want to scroll as the user scrolls in the browser window so it will always be visible. First off, putting onsroll in the body tag of my master page does nothing. Oh, IE is the browser. <body onscroll="alert('scrolling')"> I was able to get around this setting an event hander for window.onscroll. However, body.scrollTop is always 0! I wrote a plain aspx test...
0
2146
by: Jocker | last post by:
Hi Group I'm writing an Internet Explorer plugin. Everything works well, except when I try to handle the onscroll event. http://msdn.microsoft.com/workshop/browser/mshtml/reference/ifaces/window2/onscroll.asp http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onscroll.asp another possibility seems to exist with IHTMLElement2.onscroll using the document body, but this does not solve the problem. the following code snippet...
0
1702
by: Jocker | last post by:
I'll try reposting this message with the hope someone can help me with this issue. PS: is this the right newsgroup for this question? --- Hi Group I'm writing an Internet Explorer plugin. Everything works well, except when I try to handle the onscroll event.
0
2663
by: bluegrasslover | last post by:
I've gotten a couple of emails about this problem lately so I'm going to post the solution that someone emailed me a while back. When you create a master page visual studio automatically adds a <-- doctype ... statement near the top of the master page. Somehow this forces some w3c standard where scrolltop isn't supported. I removed the doctype declaration from my masterpage and everything works fine. Actually I changed the dtd type to...
0
10644
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10393
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4334
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.