Hi to all,
Im making this small class:
function ReportItem()//sera un <table> con celdas
{
this.HTML="";
}
//data has an 2d array with headers and data to render a table
ReportItem.prototype.Test=function(data)
{
this.HTML="<div onclick=DoAny()>"+this.HTML"</div>";
document.write(this.HTML);
}
ReportItem.prototype.DoAny()=function()
{
alert(this.HTML);
}
//initialize the class
var ri= new ReportItem();
ri.Test('<table><tr><td>asdjasd</td></tr></table>');
My question is:
I can create an instance of the class, and execute the Test method without problems, but, when i click in the layer that the class generate i cant execute the DoAny method?
Could you give me a hand?
Thanks a lot.
Regards.
Josema.
Im making this small class:
function ReportItem()//sera un <table> con celdas
{
this.HTML="";
}
//data has an 2d array with headers and data to render a table
ReportItem.prototype.Test=function(data)
{
this.HTML="<div onclick=DoAny()>"+this.HTML"</div>";
document.write(this.HTML);
}
ReportItem.prototype.DoAny()=function()
{
alert(this.HTML);
}
//initialize the class
var ri= new ReportItem();
ri.Test('<table><tr><td>asdjasd</td></tr></table>');
My question is:
I can create an instance of the class, and execute the Test method without problems, but, when i click in the layer that the class generate i cant execute the DoAny method?
Could you give me a hand?
Thanks a lot.
Regards.
Josema.