My.Templates.Download.create = function()
{
var obj = this.prototype;
obj.setAttribute("SRC",this.getItemProperty("value") );
obj.setStyle('width', 75);
obj.setStyle('height','20');
obj.setEvent("onclick",function (src){
alert ( this.getItemProperty("value") );
});
};
if (this.getItemProperty("value")==0) {
obj.setAttribute("SRC","./images/d1.jpg");
obj.setAttribute("SRC",this.value );
obj.setEvent("onmouseover", "this.src='./images/d2.jpg'");
obj.setEvent("onmouseout", "this.src='./images/d1.jpg'");
}
else {
obj.setAttribute("SRC","./images/d2.jpg");
obj.setAttribute("SRC",this.value );
obj.setEvent("onmouseover", "this.src='./images/d1.jpg'");
obj.setEvent("onmouseout", "this.src='./images/d2.jpg'");
}
obj.setAttribute("SRC", function(){
if (this.getItemProperty("text")=="1")
return "./images/d1.jpg";
else
return "./images/d2.jpg";
});
obj.setEvent("onmouseover", function() {return "this.src='./images/d2.jpg'"});
obj.setEvent("onmouseover", "this.src='./images/d2.jpg'");
My.Templates.Download = Active.HTML.IMG
My.Templates.Download.create = function()
{
var obj = this.prototype;
obj.setAttribute("SRC", function(){
if (this.getItemProperty("text")=="1")
return "./images/d1.jpg";
else
return "./images/d1.jpg";
});
obj.setStyle('width', 75);
obj.setStyle('height',20);
function mouseOver(){
this.setAttribute("SRC", "./images/d2.jpg");
this.refresh();
}
function mouseOut(){
this.setAttribute("SRC", "./images/d1.jpg");
this.refresh();
}
obj.setEvent("onmouseout", mouseOut);
obj.setEvent("onmouseover", mouseOver);
};
My.Templates.Download.create();
This topic is archived.