BigRed
09-08-2003, 09:52 AM
Hi. I have javascript code that pops up a confirmation delete box to confirm that I want to delete a particular record out of a grid. This works fine:
function window.onload() {
var btn = document.all("fpgData_Delete")
btn.onclick = Delete;
}
function Delete() {
var msg = "Are you sure you wish to delete the selected row?";
if (confirm(msg))
{
__doPostBack(fpgData.id, "Delete"); }
}
The problem is that I have 2 grids to run this with (and I only have 1 window.onload function). I have created a try...catch, but it doesn't seem to work. Can someone tell me what if this is the easiest way or another way to handle this? Thanks in advance for any help!!
BR
function window.onload() {
var btn = document.all("fpgData_Delete")
btn.onclick = Delete;
}
function Delete() {
var msg = "Are you sure you wish to delete the selected row?";
if (confirm(msg))
{
__doPostBack(fpgData.id, "Delete"); }
}
The problem is that I have 2 grids to run this with (and I only have 1 window.onload function). I have created a try...catch, but it doesn't seem to work. Can someone tell me what if this is the easiest way or another way to handle this? Thanks in advance for any help!!
BR