We have a very basic <script> tag placed in the content placed holder header of a custom aspx page. The javascript causes a text box to appear when a radio button is selected. However, the for loop (that parses selected radio button options) as well as the conditional (if/else) statement are NOT firing. When i developed the page on my local host before integrating it, it worked flawlessly (it's a simple function). However upon incorporating it into wcm......broken! i placed alerts all throughout the function to see where it's not firing and it refuses to execute the conditional or the loop. Is there something in wcm that must be enabled to allow conditionals? Is there something else I'm not aware of in WCM?? Any assitance is appreciated.
function rBtnClick() {
alert('inside rbtnclick'); // firing
var radio = document.getElementsByName('RadioButtonList8');
alert('assigned radio'); // firing
for (var i = 0; i < radio.length; i++) {
alert('inside for'); //not firing
if (radio[i].checked) {
alert('a button has been checked'); //not firing
if (radio[i].value == 'Yes') {
alert('displaying explanation box'); //not firing
document.getElementById('question8Yes').style.display = 'block';
}
else {
alert('removing explanation box'); //not firing
document.getElementById('question8Yes').style.display = 'none';
}
}
}
}
could you post your html
could you post your html code for this page