Code:
if("dept"=='dept'){
document.getElementById('add').style.display='none';
};
<DIV id="add">
<some html here..>
</DIV>
(PS it might seem odd check if dept is the same as dept, but the first "dept" is actually a PHP variable)
if("dept"=='dept'){
document.getElementById('add').style.display='none';
};
<DIV id="add">
<some html here..>
</DIV>
<script> Javascript.. </script> <div>
<html>
<head>
<!-- header stuff here -->
<script language="javascript">
function windowOnLoad()
{
var divElement = document.getElementById('myDiv');
//do stuff with your div here
}
try{
window.attachEvent('onload',windowOnLoad); //MSIE
} catch(e) {
try{
window.addEventListener('load,windowOnLoad,false); //Proper browser
} catch(e) {
alert('Your browser is really old');
}
}
</script>
</head>
<body>
<div id="myDiv">
</div>
</body>
</html>
Comment