# Fix known Mac Firefox bug with JavaScript

**URL:** <https://forum.kirupa.com/t/fix-known-mac-firefox-bug-with-javascript/252421>\
**Category:** web dev\
**Created:** [February 20, 2008, 12:23am UTC](https://forum.kirupa.com/t/fix-known-mac-firefox-bug-with-javascript/252421 "2008-02-20T00:23:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![morktron](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@morktron](https://forum.kirupa.com/u/morktron)\
**Post date:** [February 20, 2008, 12:23am UTC](https://forum.kirupa.com/t/fix-known-mac-firefox-bug-with-javascript/252421/1 "2008-02-20T00:23:18Z")

</div>

Hi I hope I’ve come to the right place.

I don’t know how to write JavaScript, basically how do I add this:

```auto
hideWindowFixed(id){ var win = document.getElementById(id); win.style.visibility = "hidden"; win.style.display = "none";}

```

to this

```auto
<div class="close"><a href="#"><img src="../images/close-window-off.gif" alt="close" name="closeimg" width="147" height="35" id="closeimg" onclick="MM_showHideLayers('wedText','','hide')" onmouseover="MM_swapImage('closeimg','','../images/close-window-on.gif',1)" onmouseout="MM_swapImgRestore()"/></a></div>

```

The problem is that on Firefox for Mac it has an error that makes it display hidden scrollbars. The solution is here: [www.errorforum.com](http://www.errorforum.com/mozilla-firefox-error/3503-will-float-mac-firefox-scrollbars-floating-pop-up-windows.html)

The page I’m trying to fix is here: http://www.barneyjonesphotography.com/pages/weddings.htm

Can anyone help? I imagine it’s easy if you know the syntax?

thanks  
mark :ponder:
