Jump to content

iyeru42

Members
  • Posts

    231
  • Joined

  • Last visited

Posts posted by iyeru42

  1. Well, I can't use this though:
    <public:component><public:attach event="onpropertychange" onevent="propertyChanged()" /><script>var supported = /MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == "Win32";var realSrc;var blankSrc = "blank.gif";if (supported) fixImage();function propertyChanged() {   if (!supported) return;   var pName = event.propertyName;   if (pName != "src") return;   // if not set to blank   if ( ! new RegExp(blankSrc).test(src))      fixImage();};function fixImage() {   // get src   var src = element.src;   // check for real change   if (src == realSrc) {      element.src = blankSrc;      return;   }   if ( ! new RegExp(blankSrc).test(src)) {      // backup old src      realSrc = src;   }   // test for png   if ( /\.png$/.test( realSrc.toLowerCase() ) ) {      // set blank image      element.src = blankSrc;      // set filter      element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +                                     src + "',sizingMethod='scale')";   }   else {      // remove filter      element.runtimeStyle.filter = "";   }}</script></public:component>

    And even if it did work, what If I wasn't using Win32, and I was using some other form of Windows? (Like that made for x64 processors.)

  2. You want to select the column `label1`?

    SELECT COUNT( * ) AS `Rows` , `label1`FROM `(something)`GROUP BY `label1`ORDER BY `label1`

    Would count how many things have label1. I wouldn't know how to do what you're doing though.

  3. Normally IE 5.5 to 6 doesn't handle PNGs... I have a JavaScript code (shown below) but for my IE6, it doesn't work. Please help me.

    function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.  {  for(var i=0; i<document.images.length; i++)	 {	  if(document.images[i].className == "noAlpha") //This is where you can change the className		{  var imgpng = document.images[i]  var imgpngName = imgpng.src.toUpperCase()  if (imgpngName.substring(imgpngName.length-3, imgpngName.length) == "PNG")	 {  var imgpngID = (imgpng.id) ? "id='" + imgpng.id + "' " : ""  var imgpngClass = (imgpng.className) ? "class='" + imgpng.className + "' " : ""  var imgpngTitle = (imgpng.title) ? "title='" + imgpng.title + "' " : "title='" + imgpng.alt + "' "  var imgpngStyle = "display:inline-block;" + imgpng.style.cssText  if (imgpng.align == "left"){ imgpngStyle = "float:left;" + imgpngStyle }  if (imgpng.align == "right"){ imgpngStyle = "float:right;" + imgpngStyle }  if (imgpng.parentElement.href){ imgpngStyle = "cursor:hand;" + imgpngStyle }  var strNewHTML = "<span " + imgpngID + imgpngClass + imgpngTitle  + " style=\"" + "width:" + imgpng.width + "px; height:" + imgpng.height + "px;" + imgpngStyle + ";"	 + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"  + "(src=\'" + imgpng.src + "\', sizingMethod='scale');\"></span>"  imgpng.outerHTML = strNewHTML  i = i-1	 }	 }  }}if( window.attachEvent ){window.attachEvent("onload", correctPNG);}

    Please Note: This script ONLY works on Windows Operating Systems running Internet Explorer 5.5 or higher. Firefox/Netscape/Opera/IE7 users have no need for this script, because A.) It doesn't work in those browsers and B.) They already handle PNGs correctly.Also Note: Setting the code BBCode to codebox causes everything in it to be italics. Another note, I couldn't search in this forum for PNG since IPB limits the minimum number of characters for searching to four.

  4. I need this code to work so that it cycles through different colors instead of just fading between two different colors. Can someone help me?

    /************* **** <config> **/ startColor = "#6666FF"; // MouseOut link color endColor = "#AA22AA"; // MouseOver link color stepIn = 15; // delay when fading in stepOut = 15; // delay when fading out /* ** set to true or false; true will ** cause all links to fade automatically ***/ autoFade = true; /* ** set to true or false; true will cause all CSS ** classes with "fade" in them to fade onmouseover ***/ sloppyClass = true; /** **** </config> **************/ /************* **** <install> ** ** **** </install> **************/ hexa = new makearray(16); for(var i = 0; i < 10; i++) hexa[i] = i; hexa[10]="a"; hexa[11]="b"; hexa[12]="c"; hexa[13]="d"; hexa[14]="e"; hexa[15]="f"; document.onmouseover = domouseover; document.onmouseout = domouseout; startColor = dehexize(startColor.toLowerCase()); endColor = dehexize(endColor.toLowerCase()); var fadeId = new Array(); function dehexize(Color){ var colorArr = new makearray(3); for (i=1; i<7; i++){ for (j=0; j<16; j++){ if (Color.charAt(i) == hexa[j]){ if (i%2 !=0) colorArr[Math.floor((i-1)/2)]=eval(j)*16; else colorArr[Math.floor((i-1)/2)]+=eval(j); } } } return colorArr; } function domouseover() { if(document.all){ var srcElement = event.srcElement; if ((srcElement.tagName == "A" && autoFade) || srcElement.className == "fade" || (sloppyClass && srcElement.className.indexOf("fade") != -1)) fade(startColor,endColor,srcElement.uniqueID,stepIn); } } function domouseout() { if (document.all){ var srcElement = event.srcElement; if ((srcElement.tagName == "A" && autoFade) || srcElement.className == "fade" || (sloppyClass && srcElement.className.indexOf("fade") != -1)) fade(endColor,startColor,srcElement.uniqueID,stepOut); } } function makearray(n) { this.length = n; for(var i = 1; i <= n; i++) this[i] = 0; return this; } function hex(i) { if (i < 0) return "00"; else if (i > 255) return "ff"; else return "" + hexa[Math.floor(i/16)] + hexa[i%16];} function setColor(r, g, b, element) { var hr = hex®; var hg = hex(g); var hb = hex(; element.style.color = "#"+hr+hg+hb; } function fade(s,e, element,step){ var sr = s[0]; var sg = s[1]; var sb = s[2]; var er = e[0]; var eg = e[1]; var eb = e[2]; if (fadeId[0] != null && fade[0] != element){ setColor(sr,sg,sb,eval(fadeId[0])); var i = 1; while(i < fadeId.length){ clearTimeout(fadeId[i]); i++; } } for(var i = 0; i <= step; i++) { fadeId[i+1] = setTimeout("setColor(Math.floor(" +sr+ " *(( " +step+ " - " +i+ " )/ " +step+ " ) + " +er+ " * (" +i+ "/" + step+ ")),Math.floor(" +sg+ " * (( " +step+ " - " +i+ " )/ " +step+ " ) + " +eg+ " * (" +i+ "/" +step+ ")),Math.floor(" +sb+ " * ((" +step+ "-" +i+ ")/" +step+ ") + " +eb+ " * (" +i+ "/" +step+ ")),"+element+");",i*step); } fadeId[0] = element; }

×
×
  • Create New...