Forum Moderators: open
Opera has no complaints about the following, but IE complains of 'member not found', and FF - 'setting a property that has only a getter'
the script:
hidden=0;function shownHide (show, hide){
if (hidden==0){
var fullwidth=document.getElementById(show)
fullwidth.style='margin-left:20px;';
var offscreen=document.getElementById(hide)
offscreen.style='margin-left:-140px; margin-right:-20px;';
hidden=1;
} else {var fullwidth=document.getElementById(show)
fullwidth.style='';
var offscreen=document.getElementById(hide)
offscreen.style='';
hidden=0;
}
}
is just called with:
<a href="#" onclick="shownHide('content', 'nav')"
pointers much appreciated.
thanks
Ben
My suggestion/guess would be to not try and set the
style of the objects, but set the value of the style property you want to change. For example, fullwidth.style.marginLeft = '20px';. And rather than try and set the style to nothing, you can set marginLeft to 'auto' or something innocuous like that.