Results 1 to 3 of 3

Thread: Lightbox - revealing hidden form

  1. #1
    Join Date
    Jan 2009
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Lightbox - revealing hidden form

    1) Script Title:
    lightbox

    2) Script URL (on DD):

    http://www.dynamicdrive.com/dynamici...box2/index.htm

    3) Describe problem:

    Everything works great apart from after the image is closed it reveals a totally seperate hidden dropdown form.

    Here is an example - http://www.nationwideltd.co.uk/glass-verandas.html

    if you click any of the images the lighbox shows. Close it, then look towards the left navigation menu on the page and you will see two drop down boxes that should be hidden.

    Any tips would be great on stopping this.

    Thanks a lot

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    For backward compatibility in IE 6 and earlier where select elements show through all overlaying content, Lightbox hides all selects when opened, and reveals all selects when closed. This is done via their visibility style property.

    What you are observing shouldn't be happening though because their container is still visibility hidden, and visibility is supposed to be inherited. But obviously it is happening. So here is what I suggest, in lightbox.js find this code:

    Code:
    function showSelectBoxes(){
    	var selects = document.getElementsByTagName("select");
    	for (i = 0; i != selects.length; i++) {
    		selects[i].style.visibility = "visible";
    	}
    }
    Change it to:

    Code:
    function showSelectBoxes(){
    	var selects = document.getElementsByTagName("select");
    	for (i = 0; i != selects.length; i++) {
    		selects[i].style.visibility = "";
    	}
    }
    That will, instead of setting the visibility property explicitly to visible, allow it to revert to whatever it was, which in this case was nothing, so should work out well. It also should have no adverse effect upon any other select(s) that you have on the page. If not, we can take more elaborate measures.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    ollyno1uk (03-08-2009)

  4. #3
    Join Date
    Jan 2009
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Hi

    Thanks a lot for your help here - this seems to have resolved the problem. Great stuff.

    Thanks again

    Olly

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •