Script# - Browser compatibility issue on events
-
Wednesday, July 06, 2011 7:36 PM
Hi All,
I'm new to Script# and Ajax.I've a custom HTML grid control. Trying to attach behaviour through a class extending from AJAX 'Control' Class. The class is wirtten in Script#. I've added onmouseover and onmouseout events the grid DOM Element and given the implementation to those events. The script# generated the Javascript for the html control and that is working on IE. But the same code is not working on Mozilla firefox and chrome browsers.
The line used to add event is,
this.Element.AddEvent("onmouseover", this.mouseOverEventHandler);
(this AddEvent is from System.DHTML)
This code is generating the following javascript,
this.getElement().AddEvent(onmouseover", this.mouseOverEventHandler);Tried to debug the script and found that, on firefox, the control is not going beyond this addEvent line, its going to someother Microsoft Ajax script (default Ajax script i think). Since the event is not loaded, the event is not getting fired.
So, is there any other way of adding events in general, which should work for all browsers?
Found that there is another method to add events from Sys.UI.DOMEvent.AddEvent, but not sure what is the difference between adding events from Sys.UI AddEvent and System.DHTML.AddEvent.
Thanks,
Venkat.
All Replies
-
Wednesday, July 06, 2011 10:08 PM
Hi Venkat,
Unless you're asking about Reactive Extensions (Rx), you've posted to the wrong forum.
Here's the official Ajax forum:
http://forums.asp.net/1022.aspx/1?ASP+NET+AJAX+Ajax+Control+Toolkit
I'm not sure what Script# is though, so you'll have to find that forum on your own.
- Dave
http://davesexton.com/blog- Proposed As Answer by Dave Sexton Wednesday, July 06, 2011 10:08 PM

