use the given javascript to get the control client id in javascript from user control or data grid
function GetClientId(strid)
{
var count=document.forms[0].length;
var i=0;
var eleName;
for (i=0; i < count; i++ )
{
eleName=document.forms[0].elements[i].id;
pos=eleName.indexOf(strid);
if(pos>=0) break;
}
return eleName;
}
function GetClientId(strid)
{
var count=document.forms[0].length;
var i=0;
var eleName;
for (i=0; i < count; i++ )
{
eleName=document.forms[0].elements[i].id;
pos=eleName.indexOf(strid);
if(pos>=0) break;
}
return eleName;
}
No comments:
Post a Comment