views:

26

answers:

1

I have two radio buttons:

<input dojoAttachPoint="sensorSwipe" id="sensorSwipe" type="radio" 
                            dojoType="dijit.form.RadioButton" name="Sensor" checked /> 
                        <input dojoAttachPoint="sensorContinuous" id="sensorContinuous"  type="radio" 
                            dojoType="dijit.form.RadioButton" name="Sensor" /> 

...that I'm submitting in a form using an dojo xhrpost call:

dojo.xhrPost({
        url: baseUrl + path,
        form: form,
        timeout: 60000,
        load: function(result) { PostSuccess(result, path, callbackFunction); },
        error: function(error, args) { AjaxError(error, args, path, request, callbackFunction); }
    });

The issue is that when submitting the form, it sends a "Sensor" property with a value of "on", regardless of which of the two radio buttons is selected. How can I tell which radio button was selected?

+1  A: 

You should add value attribute to the <input> to specify the value.

Alex Cheng
Works, thanks!!
Justin