Hi
am having some problems with the javascript confirm.
i have it working fine on one page and it doesnt even pop up at the
other.
The code on the working page is,
private void Page_Load(object sender, System.EventArgs e)
{
if(! Page.IsPostBack)
{
DataSet _DSSections =
VariableHandler.GetInstance().FetchAllVariables();
if (_DSSections.Tables[0].Rows.Count > 0)
{
lblInstructions1.Visible = true;
btnEdit.Visible = true;
btnDelete.Visible = true;
btnDelete.Attributes.Add("OnClick","javascript:ret urn confirm('Do
you wish to delete the selected variable');");
GrdVariableList.DataSource = _DSSections;
GrdVariableList.DataBind();
}
}
}
The one not working has the same javascript in the same way.
but it doesnt work. Other alerts on the page are showing up. but the
confrim isnt.
When i viewed the source of both the pages i found the following
diference
working:
<input type="submit" name="btnDelete" value="Delete Selected"
onclick="if (typeof(Page_ClientValidate) == 'function')
Page_ClientValidate(); " language="javascript" id="btnDelete"
OnClick="javascript:return confirm('Do you wish to delete theselected
variable variable');" style="height:29px;width:100px;" />
Not Working:
<input type="submit" name="btnDelete" value="Delete Selected"
id="btnDelete" OnClick="javascript:return confirm('Do you wish to
delete the selected variable');" style="height:29px;width:100px;"
/>
i have no idea when the "iftypeof" thing was added in the first code
and why wasnt it added in the second one.
kindly help me out of this.
thnkx
MA