Visual Studio 2010: Asp.Net 4.0
I am trying to get the first cell[0] of the cell collection of GridView on postback with the following JavaScript function. It works in IE8 and IE9 but not in firefox or Safari.
function onBeginRequest(sender, args) {
var send = args.get_postBackElement().id;
if (args.get_postBackElement().cells != null) {
var menu = args.get_postBackElement().cells[0].innerHTML;
if (menu.indexOf("vehicles") != -1) {
send = "ProjectClick";
}
}
if (displayWait(send) == "yes") {
$find('PleaseWaitPopup').show();
}
}
Use the getElementById method and get control tagName or verify Id. I checked the tagName.