Object Expected???
- From: "JLuv" <JLuv3k6@xxxxxxxxx>
- Date: 11 Aug 2006 12:09:22 -0700
I have a javascript function defined in my <head> tag on my ASP.NET
page. In the code-behind i have the lines...
void pGrid_DeleteCommand(object source, DataGridCommandEventArgs e)
{
string fName, lName;
fName = e.Item.Cells[5].Text.Trim();
lName = e.Item.Cells[4].Text.Trim();
Response.Write("<script language=javascript>confirmDelete('" +
fName + "', '" + lName + "')</script>");
if (hdnDelete.Value == "true")
//do stuff
}
confirmDelete() looks like this...
function confirmDelete(fName, lName)
{
if(confirm('Delete ' + fName + ' ' + lName + '?'))
{
document.form1.hdnDelete.Value = 'true';
alert(document.form1.hdnDelete.Value); //returns 'true'
like its suppose to.
}
else
{
document.form1.hdnDelete.Value = 'false';
}
}
However, whenever i trigger the event that holds the Response.Write(),
i get the "Object Expected" error.
Any help?
.
- Follow-Ups:
- Re: Object Expected???
- From: Randy Webb
- Re: Object Expected???
- From: Richard Cornford
- Re: Object Expected???
- Prev by Date: Re: which DOM level to use?
- Next by Date: Populate input fields on a web form
- Previous by thread: Tutorials
- Next by thread: Re: Object Expected???
- Index(es):