I\'m trying to assign 2 values to each radio button, to output in 2 fields. But it doesn\'t work. Here the code im using:
a pure js solution:
some notes: if you pass this.value to the function then you cant access valueB anymore, pass just the entire element. To set the value use just theTargetElement.value not value and valueB ( thats just wrong ). Dont know why you ve a comma after value ( thats wrong too )
function check(browser) {
document.getElementById("answer").value = browser.getAttribute("value");
document.getElementById("answerB").value = browser.getAttribute("valueB");
}