You could try something like iterating in an array, for instance

---
function IsValid(elementSet)
{
  for (var idx in elements)
  {
    var el = elements[idx];

    // Validate el.
    ...
  }
}

Sample invocation:

IsValid(['TextBox1','TextBox2','TextBox3']);
---

On Sep 30, 10:21 pm, himanshu <[email protected]> wrote:
> document.getElementById("<%=TextBox1.ClientID%>").value;
>
> we ryt this in script.
> is there any way from which i can call one javascript function for all
> texboxes which need same kind of validation.i mean by parameter like
>
> function isvalid(value)
> {
>        validation
>
> }
>
> could call it like isvalid(textbox1)
>
> is it possible
> if yes how?

Reply via email to