JavaScript has an arguments collection that receives all parameters passed to it:
function CheckArgs()
{
for(var x=0; x<arguments.length; x++)
{
alert(arguments[x]);
}
}
You can also have actual parameters but pass more than the parameter list. They'll all show up in the arguments array in client script.
+++ Rick ---
>Hi everybody,
>
>I'd like to write a ToggleDisplay JavaScript function. Currently I'm calling it as
>
>this.btnSaveProfile.Attributes["onclick"] = "ToggleDisplay('GridInfo','ProfileInfo');";
>
>There is no problem to write it as accepting 2 parameters. But how can I make it more generic to process any number of parameters and toggle the display?
>
>Thanks a lot in advance.