params Property

This topic documents a feature of Binary Behaviors, which are obsolete as of Internet Explorer 10.

A property of the call object that specifies an associative array of parameter values.


Scripting [ objCallparams = ] objCall.params

Possible Values

objCall An instance of the call object.
params An associative Array defining a collection of values that are passed as the arguments of a remote method invocation.

The property is read/write. The property has no default value.


This property provides a mechanism to define the arguments of a remote method as an associative array. This property provides an alternative to specifying a list of parameters in the callService method, which is the default approach.

Windows Internet Explorer uses loosely typed scripting languages, which means that an associative array can be used to define a wide variety of complex data types.

Using an associative array to define parameters might be more convenient in several scenarios, especially if the document objects used in the client document or the members of the Web Service class have a well-defined structure. For example, when an array of input controls in a document is used to define the input parameters for a sequence of remote method calls, it can be convenient to iterate through a collection of these controls, and then use the params property to store updated arguments.

An associative array enables the definition of the name-value pairs, which make the definition of the parameters submitted to a Web method order-independent. When you specify parameter values of a remote method directly with the callService method, the parameters are mapped to the arguments of the Web method by their order.


The following code snippet shows how the params can be used.

<script language="JavaScript">
function Doc_Load()
    proxy.useService("employee.asmx", "EmployeeService");
    // Define a call object
    var objCall = proxy.createCallOptions();
    // Define the function for the RPC call.
    objCall.funcName = "echoEmployee";
    // Define the Array
    objCall.params = new Array();
    // Define the attributes of Fred, an instance of "Employee" data type = "Fred";
    objCall.params.male = "true";
    objCall.params.age = "32";
    objCall.params.worth = "654000.00";
    objCall.params.hireDate = "01/10/2001";
    objCall.params.title = "Developer";
    // Make the RPC call using the call object (objCall).
    proxy.EmployeeService.callService (fnHandler, objCall);

function fnHandler(res)
    if (!res.error) 
<div id="proxy" style="behavior:url('');"></div>

Applies To

call, WebService

See Also

async, callService, password, portName, SOAPHeader, timeout, userName