SDI.ECS.Anchor = SDI.ECS.Component.subclass();
/**
*
*/
SDI.ECS.Anchor.create = function(){
var obj = this.prototype;
obj.setTag("a");
obj.setClass("ecs", "Anchor");
obj.defineProperty( "text", "" );
obj.defineProperty( "image", null );
obj.defineProperty( "action", null );
obj.setAttribute( "href",function(){return this.getAction();} );
obj.setContent( "text", function(){
var t = this.getText();
return t;
} );
obj.setContent( "img", function() {
var img = null;
var imgSrc = this.getImage();
if (imgSrc) {
img = new Active.HTML.IMG();
img.setAttribute( "src", IMAGES_HOME +"/"+ imgSrc );
img.setAttribute( "border", "0" );
}
return img;
} );
};
SDI.ECS.Anchor.create();
var a = new SDI.ECS.Anchor();
a.setText("Hello World");
This topic is archived.