dwr.util.getValues()

getValues(object, options) is similar to getValue(id, options) 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.

By default DWR protects against XSS in dwr.util.getValues by escaping potentially dangerous characters. The optional options object parameter allows output escaping to be disabled. Please see the escapeHtml page for more information.

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"):