Javascript Alert Problem
I am trying to add an alert box so that the user can choose either Yes or No or Ok and Cancel, but it is not working correctly.I have to do a database check which is done in c shar
Solution 1:
your code is absolutely correct. only syntax error. just remove "\" before starting the double quotes in the line->
Response.Write("return confirm(\"Are you sure?\")");
replace with this line
Response.Write("return confirm("Are you sure?\")");
Solution 2:
I don't see where you're calling the function. Why not have the function always on the page and dynamically add the function call to the button in the code behind?
Something like:
button.Attributes.Add("onclick", "onsub();");
Post a Comment for "Javascript Alert Problem"