Ok assume the following: I have most recent jQuery, and jQueryUI, the problem is occuring in code in a seperate js file within an object function.
I have 8 radio buttons, each the same name.
When I call the function which at the moment is just an alert...
This code produces an alert that is always the first radio buttons value despite any radio being checked, or a different radio then the one that has a different value. Same value everytime.
I use this same method in another section of my website though that is in an event method. Also this method is not within form tags. The other one is.
Whats wrong?
I have 8 radio buttons, each the same name.
When I call the function which at the moment is just an alert...
Code:
function obj() {
this.nav = function() {
var val = $("input[name=radioButtons1]").attr("value");
alert(val);
}
}
I use this same method in another section of my website though that is in an event method. Also this method is not within form tags. The other one is.
Whats wrong?
Comment