Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

problem with LightWindow


Go to End


9 Posts   3609 Views

Avatar
Rube_25

Community Member, 36 Posts

20 October 2008 at 11:25am

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

Avatar
bummzack

Community Member, 904 Posts

20 October 2008 at 8:01pm

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.

Avatar
Rube_25

Community Member, 36 Posts

21 October 2008 at 2:55am

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

Avatar
bummzack

Community Member, 904 Posts

21 October 2008 at 4:08am

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...

Avatar
Rube_25

Community Member, 36 Posts

21 October 2008 at 6:06am


thanks banal but

The problem is not in script,

Does anyone know why the flash overlaps in ligthWindows?

rube

Avatar
bummzack

Community Member, 904 Posts

21 October 2008 at 7:57am

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

Avatar
Rube_25

Community Member, 36 Posts

21 October 2008 at 9:09am

Thanks banal

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

Avatar
Rube_25

Community Member, 36 Posts

21 October 2008 at 10:26am

Excelent !!!

problem solved

with this parameter in my code

wmode="transparent"

rube

Go to Top