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

Event

2 Answers 91 Views
Button
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 22 Jun 2012, 07:26 AM
Dear Telerik-Support,

I use a RadButton and the Event OnClientClicking with the parameter sender, args.

I need the dom Event in this method. I try it with the global event reference and it only works for IE because Firefox etc. are not implement this global event reference. So I try it with an anoynomous function

Button property
OnClientClicking = function(sender, args) {  FnButton_ClientClicking(sender, args, event) };
 
JavaScript
function FnButton_ClientClicking(sender, args, e)
{
}

but in the function e will be undefined on firefox.

Whats wrong here? How can I parse the dom event to the function. If I try the same with an ImageButton and the OnClientClick Event the Browesers parse by using (this, event) all what I need!

Thanks for help,

Kind regards,
Christian

2 Answers, 1 is accepted

Sort by
0
Christian
Top achievements
Rank 1
answered on 26 Jun 2012, 11:44 AM
Any idea on this issue?
0
Slav
Telerik team
answered on 26 Jun 2012, 03:15 PM
Hello Christian,

Currently the RadButton control does not provide an access to its click DOM event object. This is a good suggestion and it will be brought to the attention of our developers for future implementation. Here you can track the status of the feature request in PITS.

For the time being you can use the following workaround to get the DOM event, which is contained in the variable domEvent:
<script type="text/javascript">
    var domEvent = null;
    Telerik.Web.UI.RadButton.prototype._mouseClickHandlerOld = Telerik.Web.UI.RadButton.prototype._mouseClickHandler;
    Telerik.Web.UI.RadButton.prototype._mouseClickHandler = function (args) {
 
        domEvent = args.rawEvent;
 
        this._mouseClickHandlerOld(args);
    }
</script>

I have updated your telerik points accordingly as a token of gratitude for your suggestion.

Regards,
Slav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Button
Asked by
Christian
Top achievements
Rank 1
Answers by
Christian
Top achievements
Rank 1
Slav
Telerik team
Share this question
or