Help with Delete Msg Prompt

Results 1 to 2 of 2

Thread: Help with Delete Msg Prompt

  1. #1
    Albert Guest

    Default Help with Delete Msg Prompt

    I need code to ask the user if they are sure they want to "delete the message" on an entry form. I prefer to use java script for this check when a person presses the delete button. Right now it works by just deleting the particular message but i would like to change it so it prompts him and asks him if he&#039s sure he would like to delete. <BR><BR>Thanks for the help

  2. #2
    Join Date
    Dec 1969

    Default RE: Help with Delete Msg Prompt

    So use a Confirm JavaScript box.<BR><BR>Something like this:<BR><BR>&#060;FORM Name="theForm" ... &#062;<BR>&#060;INPUT Type=Button Name="ActionChoice" Value="Delete"<BR>&nbsp;&nbsp;&nbsp;&nbsp;onClick= "if confirm(&#039Are you sure you want to delete?&#039) document.theForm.submit();"&#062;<BR>...<BR><BR>Th at is *not* a Submit button, notice. The beauty of doing it this way is that if the user does confirm the choice, then the form is submitted properly and, on your ASP page, you receive<BR>&nbsp;&nbsp;&nbsp;&nbsp;choice = Request("ActionChoice")<BR>and see <BR>&nbsp;&nbsp;&nbsp;&nbsp;If choice = "Delete" Then ...<BR><BR>Low code overhead; simple. Why not?<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts