Search code examples
javascriptdevexpress

What is difference between "s" and "e" in Javascript


function Something(s, e)

What is the difference between s and e?

As instance,

function Validation(s, e) {
if (e.value == null)
e.isValid = false;
var name = String(e.value);
if (name.trim() == "" || name == undefined)
e.isValid = false;
}

If I use "s" instead of "e" in above Javascript code, it does not work.

When do we use s?
When do we use e?


Solution

  • These parameters just are aliases of the pre-defined signature. It looks like that some of your questions related to DevExpress ASP.NET products. If so, you'd better refer to the Client-Side Events documentation to regarding this:

    • s parameter represents the client object that raises the event. The "s" (sender) parameter encapsulates all available client-side functionality (for the ASPxGridView class - it is the ASPxClientGridView class)
    • e parameter represents the event argument, which typically contains event-specific information.