in yours ascx control, must have the class "myClass".
window.onload = function(){
function getElementsByClass(containerId, class)
{
container = document.getElementById(containerId);
var all = container.all¦¦container.getElementsByTagName('*') ;
var arr = []
for(var k=0;k<all.length;k++)
if(all[k].getAttribute("class").indexOf("class") != -1)
arr[arr.length] = all[k];
return arr;
}
var arrEl = getElementsByClass("container", "myClass");
var xOnChange = function()
{
//this
}
for (var ind = 0; ind < arEL.length; ind++)
{
arrEl[ind].onchange = xOnChange;
}
}
in html or aspx:
<div id="container>
<!-- aspx controls -->
</div>
andres descalzo
2009-08-12 19:18:46