I got the attribute disable to finally work tonight, BUT even though I want 1 through 4 out of 6 radio buttons to disable attributes displaying lower on the product info page, only ONE of those buttons is working correctly. If I have 4 pieces of javascript code assigning one to each button, only the lowest one in the code list will actually work.
Really confused here..... :(
Here is the sample website to view what I'm trying to accomplish and view the source if needed.
http://download.pocketsongs.com/index.php?main_page=product_info&cPath=10&products_id=100001101
Here is the jscript_callbacks.js file with the FOUR dlbutton = functions at the top. In this example code, only attrib-1-4 actually disables the attributes (or the button labeled 4 - wmv video download [PC/Zune] ( +$1.00 ).
I also tried four different .js files, each with one attrib-1-1 or attrib-1-2, etc and it didn't work either. Only the 4th one works on the page too.
I cannot figure out a way to combine those code snippets either.
Any help on this so all 4 (out of 6) radio buttons are disabling the attributes would be appreciated.
function checkdl() {
dlbutton = document.getElementById("attrib-1-1");
dlbutton = document.getElementById("attrib-1-2");
dlbutton = document.getElementById("attrib-1-3");
dlbutton = document.getElementById("attrib-1-4");
if (dlbutton == null) {
return true;
}
checked = dlbutton.checked;
if (checked) {
document.getElementById("attrib-25").disabled = true;
document.getElementById("attrib-26").disabled = true;
document.getElementById("attrib-29-30").disabled = true;
document.getElementById("attrib-29-30").value= "";
} else {
document.getElementById("attrib-25").disabled = false;
document.getElementById("attrib-26").disabled = false;
document.getElementById("attrib-29-30").disabled = false;
}
return true;
}