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

eventArgs of a named/non Anonymous JS Function

5 Answers 93 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gotcha
Top achievements
Rank 1
Gotcha asked on 16 Jan 2012, 11:21 AM
Hi,

stupid question ... How can I get the list of arguments available in a named/non anonymous function?
For example, I'm calling onClientXXXX = "MyJS" on a Telerik Control and I'd like to know what is available in the eventArgs ?

Also, when i go in specific RadControls Documentation, sometimes I can get from the examples ... the methods on the eventArgs... eg : args..set_cancel(), args.get_checked()....etc but where do I get an exhaustive list of available methods/properties of those respective Args... I can't seem to find them.
Thanks

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Jan 2012, 12:44 PM
Hello Gotcha,

All Radcontrols have the two default parameters when firing a client side event, sender and args. You can use the developer tools like FireBug or Internet Explorer Developer Tools to get working with this.

Hope it helps.

Thanks,
Princy.
0
Gotcha
Top achievements
Rank 1
answered on 16 Jan 2012, 02:25 PM
Sorry probably wasnt clear enough...
I know about the sender and args objects beind sent... but how can I find out what's sent to me ( therefore is available) from each type of control when they are called client side...

This is why I'm also wondering what kind of methods and properties are available for each type of telerik control...(2nd part of the question)

Thanks
0
Dobromir
Telerik team
answered on 18 Jan 2012, 12:31 PM
Hi Cyril,

Unfortunately, at present there is no complete list of all methods and properties for the client-side event arguments. Most of these methods are listed in the Client-Side API section of our documentation per control for each event. Not all of the client-side events have detailed detailed information regarding their event arguments, but we are always working on the improvement of our documentation.

In addition, we do have planned to provide intellisence for the arguments of the client-side event handlers as will, but I am not able to provide firm estimate when this will be introduced.

For the time being, if a list of the methods / properties is missing in the documentation, you can use FireBug / DevToolbar to examine the EventArgs object as Princy suggested.

Please excuse us for the temporal inconvenience.

Regards,
Dobromir
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
0
Gotcha
Top achievements
Rank 1
answered on 18 Jan 2012, 02:10 PM
Thanks for the confirmation...
Regarding "For the time being, if a list of the methods / properties is missing in the documentation, you can use FireBug / DevToolbar to examine the EventArgs object as Princy suggested."

Can you give me some pointers on how to achieve this ?  I just started using the Chrome Developer tools but not sure how to fully utilize it to debug JS...

I'll try to google it in the meantime.. I use Chrome mostly and sometimes IE .

Thanks
C
0
Accepted
Dobromir
Telerik team
answered on 18 Jan 2012, 04:31 PM
Hi Cyril,

I, personally, prefer to use the Developer's Tools console API to log and examine objects. I have prepared a video demonstrating how to examine the arguments of the RadFileExplorer's ClientDelete event:
http://screencast.com/t/ARf1fx4Kdnv

Greetings,
Dobromir
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
General Discussions
Asked by
Gotcha
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Gotcha
Top achievements
Rank 1
Dobromir
Telerik team
Share this question
or