– I have a script that works perfectly in firefox and explorer but is not working in mozilla 1.4 which is the default browser of the users.
It toggles a div on and off from a graphic button to create the effect of a pop up window.
I have this in the head:
css:
#popupBox {
position: absolute;
top: 26px;
left: 126px;
border: solid 1px #000000;
visibility:hidden;
height: 307px;
background-image: url(content_images/smlpo.jpg);
width: 231px;
}
javascript:
<script language=”JavaScript” type=”text/JavaScript”>
<!–
function show_popup(){
document.all.popupBox.style.visibility = “visible”;
}
function hide_popup(){
document.all.popupBox.style.visibility = “hidden”;
}
function toggle_popup(){
if (document.all.popupBox.style.visibility == “visible”)
hide_popup();
else show_popup();
}
//–>
</script>
and in the body:
<a href=”javascript://” onClick=”toggle_popup()””>
mozilla’s debugger is telling me there’s an issue with ‘document.all.’ but I can’t figure out what’s tripping it up.
Any clues gratefully appreciated!
thx