Ok. So I have looked into this further and (IMHO) at some point between 4.3.4 and 4.5.3 something has changed in the way that HTML is converted to ASCX when uploaded to DNN. I know I had this working when I released this skin to the site it was on. Since I released the skin I have not changed it, but I have upgraded the DNN.
Now after some time I decided to upgrade the skin to freshen things up and implement some things I have learned while building other skins. So I make a new skin, using this code (which worked before):
<!--[if lt IE 7]>
<script language="JavaScript">
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
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[i]
var imgName = img.src.toUpperCase()
if (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
}
}
}
}
window.attachEvent("onload", correctPNG);
</script>
<![endif]-->
I put it in the skin where I did last time and prepared the skin for release. I uploaded the skin and the code is stripped out and never makes it to the ASCX file.
I figured this out because, I know when i released the skin, I would not have used PNG if I couldn't get it to work. The original skin that is on the site still works. I uploaded the original skin to one of my sites that is still running 4.4.1 and I see the problem there as well. Original skin that worked when I released it still works on the site it was originally parsed on, but not on the more current DNN builds. I went and looked and on 4.4.1 and 4.5.3 the code is not in the ASCX, but on the original site (i think it was 4.3.4 when I released the skin) the code is in the ASCX. If i manually add this code to the ASCX on 4.4.1 or 4.5.3 it works as it should.
So I would rather use the js file and reference it, if someone can help explain why the code in my previous post will not work, I think it is stripping that out as well.
I know this may sound confusing, but I think everyone here will understand.
Please help.