Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » problem with LightWindow

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1 2
Go to End
Author Topic: 2611 Views
  • Rube_25
    Avatar
    Community Member
    36 Posts

    problem with LightWindow Link to this post

    Hi everybody

       
    I installed the module from the gallery perfectly..
       
    LightWindow and works in my firefox,    
    but not in IE6,    
    the images are format .png

    this is my page
    http://draft.processmaker.com/screenshots/
       
    I hope it can help me.
    rube

  • banal
    Avatar
    Community Member
    901 Posts

    Re: problem with LightWindow Link to this post

    Maybe that "correctPNG" JavaScript function does the opposite of what it actually should? I looks like it's replacing all PNGs with a <span> that has the same size as the image and uses the PNG as background (using microsofts "filter css"). A common workaround for transparent PNGs, but i guess this is exactly what stops LightWindow from working. Just disable the correctPNG onLoad function and test if it works.

  • Rube_25
    Avatar
    Community Member
    36 Posts

    Re: problem with LightWindow Link to this post

    thanks..
    that I am using filters

    <script type="text/javascript">
    function correctPNG()
    {
    var arVersion = navigator.appVersion.split("MSIE")

    var version = parseFloat(arVersion[1])

    if ((version >= 5.5) && (document.body.filters))
    {
    for(var i=0; i<document.images.length; i++)
    {
    var img = document.images;
    var imgName = img.src.toUpperCase();

    if ((imgName.substring(imgName.length-3, imgName.length) == "PNG")||(imgName.substring(imgName.length-3, imgName.length) == "png"))
    {
    var imgID = (img.id) ? "id='" + img.id + "' " : "";
    var imgClass = (img.className) ? "class='" + img.className + "' " : "";
    var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
    var imgStyle = "display:inline-block;" + img.style.cssText;
    if (img.align == "left") imgStyle = "float:left;" + imgStyle;
    if (img.align == "right") imgStyle = "float:right;" + imgStyle;
    if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle;
    var strNewHTML = "<span " + imgID + imgClass + imgTitle
    + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
    + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
    + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>";
    img.outerHTML = strNewHTML;
    i = i-1;
    }
    }
    }
    }
    </script>
       
       
       
       </head>
    <body onload="correctPNG();">

    it works perfect for pictures .png in IE6

    but does not load the LightWindow in IE6

       
    I hope it can help me..
    I feel sorry for my bad English

    Rube

  • banal
    Avatar
    Community Member
    901 Posts

    Re: problem with LightWindow Link to this post

    Yeah, i saw that script and i suggest you disable it and then test, if LightWindow works. I think your JavaScript might be the culprit here...

  • Rube_25
    Avatar
    Community Member
    36 Posts

    Re: problem with LightWindow Link to this post

    thanks banal but

    The problem is not in script,

       
    Does anyone know why the flash overlaps in ligthWindows?

    rube

  • banal
    Avatar
    Community Member
    901 Posts

    Re: problem with LightWindow Link to this post

    Hey Rube_25

    The problem lies in your script for sure. I created a local copy of your site and removed the "onload" attribute on the <body> tag. After that it works in IE 6... just like i said.

    And concerning the flash thing: You have to set the wmode parameter of the flash embed and object tags to "transparent" or "opaque". See this article for the different parameters: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12701

  • Rube_25
    Avatar
    Community Member
    36 Posts

    Re: problem with LightWindow Link to this post

    Thanks banal

       
    I will say to me,
    about the flash    
    I see the page. rube

  • Rube_25
    Avatar
    Community Member
    36 Posts

    Re: problem with LightWindow Link to this post

    Excelent !!!

       
    problem solved
       
    with this parameter in my code

    wmode="transparent"

    rube

    2611 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.