Why is this line of Javascript giving me errors in Internet Explorer (but
not other browsers)? This function is causing errors for me in Internet Explorer - all other browsers show it correctly:
curDiv.style.display = "none";
Here's the full function....
<script type="text/javascript">
var current = "1";
function pageSwitch(id){
if(!document.getElementById) return false;
var div = document.getElementById("page"+id);
var curDiv = document.getElementById("page"+current);
curDiv.style.display = "none";
div.style.display = "block";
current = id;
}
pageSwitch(1);
</script>
I get 'Object Required' when I view the page in IE- works fine on Opera / Firefox etc....
|