I need to get the switch value using javascript
I have a radio group called selection
<input type="radio" name="selection" id="selection" value="allClients" checked="checked" />All Clients<br /> <input type="radio" name="selection" id="selection1" value="dateRange" />Date Range between
I am passing the value to another page using javascript
onclick="do_action1('liveClickCampaigns','contract_type='+document.getElementById('contract_type').value+'&beginDate='+document.getElementById('beginDate').value+'&endDate='+document.getElementById('endDate').value+'&selection1='+document.getElementById('selection1').value+'&selection='+document.getElementById('selection').value,'content');" type="button">
Value of document.getElementById ('selection'). should get the value, but it continues to give me the value of the first switch, even if the second is selected. Radio group is not in shape
javascript html
Rolling
source share