We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • While adapting the code to hide selects in IE to hide a flash element, I noticed that the code to restore the selects is not in the slidebox.js file, in the hideLightbox() function.

    http://www.village-idiot.org/search/lightbox/page/2/

    function hideLightbox()
    {
       // get objects
       var objOverlay    = document.getElementById('overlay');
       var objLightbox   = document.getElementById('lightbox');
    
       // hide lightbox, overlay
       objOverlay.style.display    = 'none';
       objLightbox.style.display   = 'none';
       
       document.onkeypress = '';
    }
    


    Shouldn’t this have this code
    		// restore hidden select boxes
    	selects = document.getElementsByTagName("select");
            for (i = 0; i != selects.length; i++) {
                    selects[i].style.visibility = "visible";
            }
    
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 7923
      • 4,213 Posts
      Hmm, yea, sounds right to me.. Maybe you should also contact the original developer (contact details here). He answers pretty fast to e-mails..

      I recently upgraded the slidebox in maxigallery to the latest version (v0.4) in the trunk and it too doesn’t have code to bring selects back to visible on lightbox close.. I’ll add that to the trunk too, thanks!

      btw, have you done any testing with ie and selects?


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
      • Indeed he does reply fast! And a very interesting reply it was, too:
        Yes, indeed you're right. But this code is deprecated.
        
        To hide and then restore code you need to use the setElementStyle
        function. Take a look to slidebox-setup.js or wait a little.
        Olivier
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 7923
          • 4,213 Posts
          slidebox-setup uses dynamicCSS library to hide the images while the scripts are loading, so I guess he’s going to make it hide the selects too.. the current maxigallery does not have this feature in slidebox, but the trunk version has.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."