HTML Button Not Submitting Page
From: Alphonse Giambrone (NOSPAMa-giam_at_example.invalid)
Date: 03/11/04
- Next message: me_at_privacy.net: "Displaying sort order"
- Previous message: kll: "Why Visual .Net will not add my web reference to the class view?"
- Next in thread: Suresh: "RE: HTML Button Not Submitting Page"
- Reply: Suresh: "RE: HTML Button Not Submitting Page"
- Reply: Natty Gur: "Re: HTML Button Not Submitting Page"
- Reply: bruce barker: "Re: HTML Button Not Submitting Page"
- Reply: Suresh: "RE: HTML Button Not Submitting Page"
- Reply: Natty Gur: "Re: HTML Button Not Submitting Page"
- Reply: bruce barker: "Re: HTML Button Not Submitting Page"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 11 Mar 2004 11:09:46 -0500
Thanks to info from Steven Cheng I am able to use an HTML button on my aspx
page in order to wrap text in it.
I am using it to delete a record in a database and it works.
My only problem is that I want to include javascript to confirm the deletion
before submitting.
I have a javascript function that prompt for confirmation and returns
true/false.
For a regular server side button I add it as follows in the page load event
and it works fine:
btnDelete.Attributes.Add("onclick", "return ConfirmDelete();")
However if I add it the same way to the HTML button, the prompt works, but
the page is not submitted.
Looking at the source, this is what is rendered for the event with and
without my added function:
onclick="return ConfirmDelete(); {if (typeof(Page_ClientValidate) !=
'function' || Page_ClientValidate())
__doPostBack('U_PageLinks1$btnDelete','')} "
onclick="{if (typeof(Page_ClientValidate) != 'function' ||
Page_ClientValidate()) __doPostBack('U_PageLinks1$btnDelete','')} "
Any suggestion on how I can confirm the delete and still submit the page?
TIA
-- Alphonse Giambrone Email: a-giam at customdatasolutions dot us
- Next message: me_at_privacy.net: "Displaying sort order"
- Previous message: kll: "Why Visual .Net will not add my web reference to the class view?"
- Next in thread: Suresh: "RE: HTML Button Not Submitting Page"
- Reply: Suresh: "RE: HTML Button Not Submitting Page"
- Reply: Natty Gur: "Re: HTML Button Not Submitting Page"
- Reply: bruce barker: "Re: HTML Button Not Submitting Page"
- Reply: Suresh: "RE: HTML Button Not Submitting Page"
- Reply: Natty Gur: "Re: HTML Button Not Submitting Page"
- Reply: bruce barker: "Re: HTML Button Not Submitting Page"
- Messages sorted by: [ date ] [ thread ]