When I post a form using dojo.xhrPost
, I get all the fields in my form POSTed except for the value of my dojox.CheckedMultiSelect, no matter what options are selected.
The declaration of my CheckedMultiSelect:
<div dojoType="dojo.data.ItemFileReadStore" jsId="processTypeList" url="json/processtypelist.json.php"></div>
<label for="processTypeSelect">Process Types</label>
<select dojoType="dojox.form.CheckedMultiSelect" name="processTypeSelect" id="processTypeSelect" multiple="true" style="height:166px;" store="processTypeList"></select>
And here is my xhrPost:
<button dojoType="dojox.form.BusyButton" id="logSearchSubmit" busyLabel="Searching..." timeout="5"
onclick="dojo.xhrPost({
url: 'handlers/logsearch.php',
form: dojo.byId('formSearch'),
handleAs: 'json'
});">Search</button>
And here is what I get POSTed:
endDate 2009-12-15
postAction search
processSelect
searchAttribute none
searchAttributeValue
startDate 2009-12-15
Any reason why the dojox control value doesn't get posted, though all the values of the dijit controls that are part of my form get posted? The control is right in between the other ones who's values get POSTed, so I know it is within the form.
I just added another button to perform console.log(formSearch.getValues())
instead of the xhrPost and I get the value of the control logged into the console. So obviously dojo is aware of it, but when I do a console.log(dojo.formToJson("formSearch"))
I get all the form data except for the the dojox control again.