I need Javascript help with asp please ?!? - TechRepublic
Question
July 11, 2011 at 09:53 AM
brian

I need Javascript help with asp please ?!?

by brian . Updated 14 years, 11 months ago

I have

info info info

and want to change the display from none to block and visibility to show (or whatever it needs to be). This is being controled by a check box, on check show and activate, uncheck hide and deactivate (so it doesn’t push my page down) I am using the following javascript in a aspx page to do this but it isn’t working quite right:

function hoteldivstuff(id) {
var obj = document.getElementById(id);
if (obj.style.visibility==”hidden”) {
obj.style.visibility = “visible”;
document.getElementById(“hoteldiv”).style.display==”block”;
} else {
obj.style.visibility = “hidden”;
document.getElementById(“hoteldiv”).style.display==”none”;
}
}

If i take the display out of the

this code will work, however when I put it in, it doesn

t show the

any more

I am sure it has to deal with my document.getElementByID lines, but I

m not sure how to fix it up right. I googled a little, but I am completely dumb when it comes to JavaScript!!!!!!!!!! HELP!! (Please 🙂 )

This discussion is locked

All Comments