I hate to beat a dead horse with this question but I am not having any luck getting two HTML Input elements to show when a checkbox is checked. I have been through multiple pages on here related to this issue with the last one being How To Show And Hide Input Fields Based On Radio Button Selection. Here is the code
function f1() {
var mycheck = document.getElementById("isevent").checked;
var myevent = document.getElementById("eventname");
var mycampaign = document.getElementById("campaign");
if (mycheck === true) {
myevent.style.display = 'normal';
mycampaign.style.display = 'normal';
alert("Myevent's visibility is " + myevent.style.display);
} else {
myevent.style.display = 'none';
mycampaign.style.display = 'none';
}
}
I can see from the alert that the function is being called by the checkbox but the display value doesn't change. Here is the fiddle page http://jsfiddle.net/352hjrwo/12/
What am I missing?