dwr.util.getValues()

getValues() is similar to getValue() except that the input is a Javascript object that contains name/value pairs. The names are assumed to be the IDs of HTML elements, and the values are altered to reflect the contents of those IDs. This method does not return the object in question, it alters the value that you pass to it.

dwr.util.getValues( )
This alters the object so that it looks like: (click the getValues button)



Note that the code here is being executed live, so try editing the input bean above, or the form below and watch how the output changes.

Form based getValues()

From DWR 1.1 getValues() will also take an HTML element (either as a DOM object or an id string) from which it will generate a reply object.

HTML Test Elements

A div element with id="div".
Text area (id="textarea"): Selection list (id="select"):
Text input (id="text"): Password input (id="password"):
Form button (id="formbutton"): Fancy button (id="button"):