whats wrong on my code? wen i put this code, make my page error..
[quote]var flashPhoto;
try {
flashPhoto = document.createElement("<style type=text/css>");
}catch(e) {
flashPhoto = document.write("<style type=text/css>div.imgblock200{width:200;height:300;overflow:hidden}</style>");
}
flashPhoto = "<div><embed src='http://widget-dc.slide.com/widgets/slideticker.swf' type='application/x-shockwave-flash' quality='high' scale='noscale' salign='l' wmode='transparent' flashvars='site=widget-dc.slide.com&channel=216172782124362204&cy=be&il=1' width='200' height='300' name='flashticker' align='middle'/></div>";
getDivElements("imgblock200",document.getElementById("content_controlpanel_1_1"),"div")[0].innerHTML=flashPhoto;
function getDivElements(divClass,getId,tagName) {
var classElements = new Array();
if ( getId == null )
getId = document;
if ( tagName == null )
tagName = '*';
var esle = getId.getElementsByTagName(tagName);
var esleLength = esle.length;
var pattern = new RegExp("(^\s*|\s*$)" + divClass + "(\s|[\$]*?)");
for (i = 0,a = 0;i < esleLength;i++) {
if (pattern.test(esle[i].className)) {
classElements[a] = esle[i];
a++;
}
}
return classElements;
}[/quote]
Last edited by dale (2007-08-07 11:00:25)