Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Displaying Confirm Box, while clicking on submit.

Posted on 2003-10-22
2
Medium Priority
?
168 Views
Last Modified: 2013-12-24
i have 2 submit buttons in a single form (eg:"delete" and "changeStatus") .
The form reloads the same page .
i use
 <cfif isdefined ("delete")>     and   <cfif isdefined ("changeStatus")>
          blah blah                               blah blah          
          </cfif>                                 </cfif>
                  to distinguish the 2 submits and do the nevessary process for each. Thats is fine.

WHAT I WANT TO DO:

i want to display a confirm message box, when i click on the DELETE Submit button. and only then process for "delete" if i click on "yes"
i am trying to do so in java script. But i am having some problems.

Please Help me by attaching a snippet
0
Comment
Question by:suda5181
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
jonnygo55 earned 600 total points
ID: 9601793
in your submit button put  onClick="return confirmDelete()"

your javascript:

function confirmDelete()
{
   if (confirmDelete()){
        var agree=confirm("Submitting will delete.  Do you want to continue?");
      if (agree){
             return true;
      }else{
             return false;
                }
     }
}
0
 
LVL 11

Expert Comment

by:hart
ID: 9604419
that should do it, it can be written in many ways.
but the basic idea would be that of jonny's

Regards
Hart

0

Featured Post

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question