I want to pass a parameter to a JavaScript function to use in document.getElementByID() as follows:
function PrinGridView(GridViewname)
{
var TableRow= document.getElementByID("GridViewname").getElementsBytagName("tr");
var td= TableRow.item(0).getElementsBytagName("th");
if(td.length>0)
alert('done');
}
In my asp page, I have an image button event:
onClicke="PrinGridView("<%=MyGrideView.ClientID%>")";
but it does not work well.
How can I pass the GridView to a function?
Thanks.
document.getElementByID("GridViewname"),GridViewNameshouldn't be in quotes