This is a migrated thread and some comments may be shown as answers.

[Solved] firefox event model

4 Answers 105 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
jkrebsbach
Top achievements
Rank 1
jkrebsbach asked on 19 Nov 2009, 03:01 PM
I am maintaining inherited code on an existing web site.  On the client side event of some controls, we have code like this:


function CustComboBoxDropDownOpeningHandler(sender, args) 
      .... [code]... 
      if (event.type == "propertychange") 
             args.set_cancel(true); 
      ..... [code].... 


Firefox does not give global access to the event object - it must be passed as a parameter.  For this reason, Firefox will not work for these controls as it is implemented above.  Is there a way to access the event object through the control?  Or is there a different signature we can give to the method to allow access the event object?  How can we know the type of event that caused this method to fire?

Thanks for your help!

4 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 20 Nov 2009, 11:19 AM
Hi jkrebsbach,

You can access the DOM event object through the event arguments of the RadComboBox's handler as follows:

var domEvent = args.get_domEvent();

Greetings,
Simon
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
jkrebsbach
Top achievements
Rank 1
answered on 20 Nov 2009, 02:12 PM
Thanks, Simon - But -

<radcombobox id="ABC" OnDropDownOpening="CustComboBoxDropDownOpeningHandler" />

function CustComboBoxDropDownOpeningHandler(sender, args) 
    var evt = args.get_domEvent(); 
    .... 

args.get_domEvent() returns: "Object doesn't support this property or method."

the only methods exposed in args for OnDropDownOpening is: constructor, get_cancel, and set_cancel.

the only property exposed in args for OnDropDownOpening is: _cancel.
0
Simon
Telerik team
answered on 20 Nov 2009, 02:29 PM
Hello jkrebsbach,

Perhaps you are using an older version of Telerik.Web.UI where in some event handlers the domEvent property was missing. We have fixed this however.

Which version of Telerik.Web.UI are you using?

Sincerely yours,
Simon
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
jkrebsbach
Top achievements
Rank 1
answered on 20 Nov 2009, 02:53 PM
I think you nailed it.  We are using: Version=2007.3.1425.35

...  Sounds like it's time to upgrade?


Tags
ComboBox
Asked by
jkrebsbach
Top achievements
Rank 1
Answers by
Simon
Telerik team
jkrebsbach
Top achievements
Rank 1
Share this question
or