var formElements = dojo.query("input:checked"); console.log("First radio input id: ", formElements[0].id); console.log("Second radio input name: ", formElements[1].name); console.log("Third radio input value: ", formElements[2].value);
Thanks Raymond,I tried this in this form but it did not work:var chkBoxes=dojo.query('input:checked','indFormM'); dojo.forEach(chkBoxes, function(check, i){ alert("ID = " + chkBoxes.id); });Is there something wrong in this statement?Thanks, appreciate your helpSamir
Thanks Raymond, I tried this in this form but it did not work: var chkBoxes=dojo.query('input:checked','indFormM'); dojo.forEach(chkBoxes, function(check, i){ alert("ID = " + chkBoxes.id); }); Is there something wrong in this statement? Thanks, appreciate your help Samir
var chkBoxes=dojo.query('#indFormM input:checked'); // <- need to use CSS decendent selector dojo.forEach(chkBoxes, function(chkBx){ alert("ID = " + chkBx.id); });
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.