I have created a radiobutton element. I would like to get the value that has been selected using element javascript, however I am finding it difficult to do so. I have used console.log to try and fish out the problem but the only value I seem to get is null or "Cannot read property 'get' of undefined".
I have tried using the following:
I added two links where I found the first bit of code and the last bit of code that I wrote above.
stackoverflow.com/questions/9618504/get-radio-button-value-with-javascript
fabrikar.com/forums/index.php?threads/help-getting-radio-buton-values-in-element-js.29037/
I've also tried with various combinations of those components as well with no success.
I feel that this should be fairly easy but that I'm getting something wrong here, any help would be appreciated.
I have tried using the following:
JavaScript:
var pr = $('input[name=video___priority]:checked');
var pr = form_75.getElements('video___priority').getValue();
var pr = document.getElementById('video___priority').value();
var pr = form_75.formElements.get('video___elementname').val();
var pr = form_75.formElements.get('video___elementname').getValue();
I added two links where I found the first bit of code and the last bit of code that I wrote above.
stackoverflow.com/questions/9618504/get-radio-button-value-with-javascript
fabrikar.com/forums/index.php?threads/help-getting-radio-buton-values-in-element-js.29037/
I've also tried with various combinations of those components as well with no success.
I feel that this should be fairly easy but that I'm getting something wrong here, any help would be appreciated.