Quote:
Originally Posted by Imar
This doesn't make sense:
Code:
onclick="confirm_delete();return false;"
This way, the delete never firer as you always return false. In my case, false is only returned when you don't confirm. If with my code the page still posts back when you cancel, there must be something in your code that you're not showing us.
Did you try the OnClientClick I proposed and deleted your own code that does it programmatically?
Imar
|
Hi Imar,
Sorry for the late response, got called away to help a colleague and spend the better part of the morning to clean up my code a little. Made so many changes to test stuff it became messy and unclear.
Anyways, I tried you onClientClick after removing the part that adds it programmatically, and it's the same problem. I click cancel, the page still posts back (and thus gets redirected when it shouldn't).
Code:
<input type="submit" id="ctl00_ContentPlaceHolder1_dgOffertes_ctl03_btnDelete" onclick="if (!confirm('Are you sure?')) { return false };" value="Delete" name="ctl00$ContentPlaceHolder1$dgOffertes$ctl03$btnDelete">
So, I am probably missing something, but since I don't know what, I also don't know what else to tell you that might help.