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(objec t sender, System.EventArg s e)
{
if(! Page.IsPostBack )
{
DataSet _DSSections =
VariableHandler .GetInstance(). FetchAllVariabl es();
if (_DSSections.Ta bles[0].Rows.Count > 0)
{
lblInstructions 1.Visible = true;
btnEdit.Visible = true;
btnDelete.Visib le = true;
btnDelete.Attri butes.Add("OnCl ick","JavaScrip t:return 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_Cl ientValidate) == 'function')
Page_ClientVali date(); " language="javas cript" id="btnDelete"
OnClick="JavaSc ript:return confirm('Do you wish to delete theselected
variable variable');" style="height:2 9px;width:100px ;" />
Not Working:
<input type="submit" name="btnDelete " value="Delete Selected"
id="btnDelete" OnClick="JavaSc ript:return confirm('Do you wish to
delete the selected variable');" style="height:2 9px;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