Javascript pop up confirm

I would like to have my form be able to delete a database
entry by clicking
a button. Easy enough.
However, I want to make sure that it isn't done by accident.
Can someone point me to information on how to create a
javascript pop up to
confirm the action prior to it executing?
If a member where to click the remove client button, I would
like a
JavaScript window to pop up and ask "Are you sure?"
If the use clicks yes, it will run the REMOVE sql query on
the page, if they
click no, it will just close the window and nothing will
happen.
Thanks
Wally Kolcz
Developer / Support

I found many examples of JavaScript confirm popups, but I
don't know how to
edit it to do what I want. I have this and, except that it
wants to leave
the site, works fine. How can I edit this so it either goes
to the right
part of the web site (the delete sol block) or runs the
delete block inside
of it? Thanks!
<script type="text/javascript">
<!--
function confirmation() {
var answer = confirm("Remove client?")
if (answer){
alert("Client has been removed.")
window.location = "
http://www.google.com/";
else{
alert("Client has not been removed.")
//-->
</script>
Wally Kolcz
Developer / Support

Similar Messages

  • Sen data to javascript pop up

    Hi All:
    I'm working with CRM IC Web Client, and i have developed a BSP Application wich uses BuPaDetail view, and the requirement is that i need to send the bp number from that view to a javascript pop up when the 'confirm' button is clicked, so i need to know how can i send that value to the pop up
    thanks & regards

    Hi Koen:
    I've already tryed it, and it didn't worked, here is a piece of the code that i want to show in a popup:
    <crmic:gridLayoutCell columnIndex="1" rowIndex="3" colSpan="3"><crmic:label design = "label"
                         id = "AccountNo"
                         for    = "//Customer/AccountNo"
                         tooltip = "<%= otr(crm_ic_appl/bupaTooltip3) %>"
                         text   = "<%= otr(crm_ic_appl/bupaAccountNo) %>"/></crmic:gridLayoutCell>
          <crmic:gridLayoutCell columnIndex="4" rowIndex="3" colSpan="5"><crmic:inputField id        = "AccountNo"
                              width = "100%"
                              maxlength = "10"
                              disabled = "TRUE"
                              value     = "//Customer/AccountNo" /></crmic:gridLayoutCell>
    I want to pass the value of the field AccountNo to a popup, but the field is not in a form, so do you have any idea?
    Thanks & regards

  • Display of javascript pop-up messages in NLS

    Does anyone have experience with the following condition?
    Display problems will occur on javascript pop-up messages if using English O/S Browser while the language preference for the user is set for another local language.
    Pop-up messages become unreadable as a result. We are trying to come up with a solution to avoid this.

    Ummm - I don't think you'll get much help for JavaScript here, as it is no relation to Java.

  • Urgent : Issue with Pop to confirm

    l_popup = l_window_manager->create_popup_to_confirm(
      text = str_table
      button_kind = 1
      message_type = 1
    close_button =  'X'
      window_title = 'Confirmation'
      window_position = if_wd_window=>co_center ).
    Here is my code to show pop to confirm screen. I want OK pop up so i used the value "1" for button_kind parameter but i get this runtime error saying
    "No Button 7 Is Defined for Popup POPUP_TO_CONFIRM"
    even after passing the value as 1 iam not able figure out why the system is taking the valye as 7. can someone please give me an immediate solution for this.
    Thanks,
    Suri

    Hi,
    i tried with same thing in m y system and it is working .
    Do one thing :
         <b>Check the fixed values in the domain of WDR_POPUP_BUTTON_KIND.</b>
    whether 1 is defined for ok.
    Madhu

  • Javascript pop-ups - Classic ASP

    Anyone ever have a problem with javascript pop-up windows no longer keeping focus after upgrading to 5.0? We recently upgraded, and this is one of the quirky things that's come up...
    Wendy Ramsaur, KSA

    Found the culprit!.
    When disabling an add-on for grabbing material into TreeDBNotes - Add to TreeDBNotes 1.0 - the rest started working fine.
    The TreeDBNotes is a great word processor / database storage, that deserves more users and upgrades!

  • PCUI Pop up Confirmation during save event

    Hi,
    I would like to implement a confirmation pop up at tthe time of save. the user may
    choose to proceed with the save or cancel save.
    I have implemented in the following fashion but apparently it does not refresh the data on the PCUI page.
    1. CHECK_BEFORE_SAVE - Raise Information Message. Set Flag not to save.
    2. SAVE - Check if flag is set not to save, return error code. and do not continue with save.
    3. GET_MESSAGES - Add the messages to rt_applog (Message is configured for navigation)
    4. PROCESS_EVENT - Process for the pop up events 'Yes' and 'No'.
    'Yes' event will call the save method after initializing do not save flag. 'No' with exit.
    Please recommend correct way to implement a pop-up confirmation during save event.
    Thanks
    Shyam

    Hi,
           This pop up is related to the WorkProtect mode,
    It will be configured in the portal,
    There will be 3 options available
    if Workprotect mode is 0--- then navigate automatically
    1-- pop up and then navigate
    2- navigate with out saving.
    i'm not sure about the values.
    WorkProtect mode can be seen in the personalize link and this link is available if eu_role is assigned to the corresponding user.
    Please contact portal admin team regarding this.
    Anilkumar

  • I am not able to open a javascript pop up mapped from RH 8. Kindly let me know an easy solution.

    I am not able to open a javascript pop up mapped from RH 8 in IE and chrome browser . Kindly let me know an easy solution.
    Thank you

    Hi,
    What output are you using? WebHelp?
    If WebHelp, you may need to amend the way you call the help. You can add the option newwnd=false to ensure that RoboHelp doesn't open the help in a popup. See http://www.wvanweelden.eu/articles/part/regular-start-page for details.
    Greet,
    Willam

  • Submit form with pop up confirmation?

    Is it possible to have a form submit but just have a pop up confirmation or just replace the form with a conformation instead of going to a new page?

    Ajax Form submission Brad
    http://forums.adobe.com/docs/DOC-1749
    Just a note, this currently has a total limit of 1024 characters through the JSON submission which is all the data. So it can not be overly big forms and messages.

  • JavaScript Pop-up Validation message

    Can we capture the JavaScript Pop-up validation message in OpenScript?

    Hi,
    While recording the Dialog box is captured with the option you choose. Subsequently, while play-back how do you dynamically change the option.
    Eg. While capturing you might have selected 'Yes' option and while playback you want to dynamically choose different option, can someone let me know the steps.
    Thanks
    Raj

  • How Can I Create A Javascript Pop-Up (On Open) Of My PDF?

    Hello All,
    I need to create a pop up window that will encourage the readers of the pdf to fill out and complete all feilds within the pdf before emailing it to a colleague. For this, we would like to use an image that we have already created. Unfotunately, being unfamiliar with Javascript, I do not know the correct syntax for creating th script that would create a pop up of the image we have created. 
    If anyone knows how I can do this, your help would be greatly appreciated.

    Winjack Solutions has 2 products, acrodialogs and acrobuttons, that can be used to create a pop-up dialog with buttons containing icon images that can bed used together to create a more visual dialog pop-up.

  • Adding text to javascript pop up window

    I am opening a pop up windows with javascript from my Flash
    movie that works fine. Each opening window has a video in it. Now
    what I'd like to do is add text under/above the quick time movie
    inside the pop up windows. I'm not very savvy with programming and
    I've tried to look all over but can't find a simple direct answer,
    so any help would be greatly appreciated.
    Thanks!
    Here's the code I have inside the Flash movie:
    btn_rebecca.onRelease = function() {
    getURL("javascript:openNewWindow('Videos/rebecca.mov','thewin','width=500,height=400,toolb ar=no,scrollbars=no')");
    And here's the code I have in the html:
    <script language="JavaScript">
    function openNewWindow(URLtoOpen, windowName, windowFeatures)
    newWindow=window.open(URLtoOpen, windowName, windowFeatures);
    </script>

    An html document is an html document. If you create a
    document that has a line of text, then the QT movie, and then
    another line of text, you have the basic layout of the movie. If
    you just open this document in a browser, it will work as a normal
    html document. If you open that same page using the window.open()
    JS method, then you can define the chrome and size of the window.
    If you don't want to create all 20 pages and load then on
    your server, then you could write a JS function to write the
    content to an html document on the fly. You might do this by:
    1. Use window.open() to open up a blank html document,
    2. Use document.write() to write the html content that you
    want in that document.
    That way you can create as many custom windows with unique
    content as you want.
    If all of the content is static, then it really is a whole
    lot less work to just make the html documents and open them as
    needed.

  • Javascript help needed (confirmation for cancel button )

    Hi guys!
    I am not good at javascript but am going to improve shortly :-). Now i need very quick fix.
    I'm using <html:cancel> button in Struts 1.1 and I'm using without thinking the following code:
    <html:cancel onclick="bCancel=true;" >
    <bean:message key="cancel.operation"/>
    </html:cancel>
    It is not that important though. I would like very much to alert user on possible loss of data (long multipaged form - could press mistakingly, who knows).
    Would you, please post the javascript code that is needed to accomplish this - just alert and if yes - cancel, no - leave alone?
    I'll really appreciate this.

    Thank you for your response.
    I also manage to write this. Is this correct?
    <script language="JavaScript">
    function ensure() {
    return confirm("Are you sure that you want to cancel this operation?");
    </script>
    <td colspan="3" align="center">
    <html:cancel onclick="bCancel=ensure();" >
    <bean:message key="cancel.operation"/>
    </html:cancel>
    </td>

  • Firefox 31 (Ubuntu) won't open new window or Javascript pop-ups

    Hi, I am running Firefox 31.0 in Ubuntu 14.04 having the following problem:
    1) When I click on New Window or New Private Window in the File menu, nothing happens, same with pressing Ctrl-N.
    2) Certain websites are not able to open new windows or pop-up windows through Java or Javascript
    (e.g. the command: javascript:popup_imp(...) does not produce anything)
    I did try safe-mode and there everything works fine. Then I restarted firefox (several times) with all plugins disabled but still had the same problem, so I don't know what causes the difference between safe-mode and no plugins.
    (By the way, there is no problem opening a New Tab by pressing Ctrl-T or from the file menu, the issue is only the New Window and New Private Window).
    Is there any other way to narrow down what is preventing the new windows?

    Hi cor-el,
    thanks for your answer, however as I explained in my post, safe-mode does not present the problem, but disabling the extensions on its own does not help (i.e with all extensions disabled the problem still is there).
    Also, I did not have this problem in the past and I did not change anything graphics related (unless something was changed software-wise internally and I did not notice).
    And yes I am currently using the default theme.

  • Html tables with javascript pop up windows

    I have two tables with different table-id in html, that are as follows -
    table-header - consists of dynamic week wise days + resources
    table-data in with same nnumbers of columns...
                          for Img - http://i.stack.imgur.com/Gwvoq.png
    The Assign Task is a Button in every cell of table-data , What I need is , whent I click any button, the Pop-up window ( Kendowindow which is I m using right now in Javascript preferably) should display respective Cell row's 1st cell i.e resource's name and Id and cell column's 1st cell i.e. Date string.
    Please suggest the solutions.... Help is kindly appreciated.
    P.S. -- Please don't suggest Kendo Grid or Scheduler, because I can't able produce this kind of format, If you can do pls share your code and procedure.

    This forum is about JavaScript in PDF files, not in HTML pages.

  • Javascript pop-up in servlets question

    I have a problem when i call a pop-up script it actually opens a blank screen upon clicking. I would like to know how do i make sure that when i click that it doesent direct to me a new page. I just want to stay in the same page.
    I tried using return in the end but still no solution.
    if (successCons) {
         output.println("<html>");
         output.println("<body>");
         output.println(" <SCRIPT LANGUAGE='JavaScript'>");
         output.println("alert('Surgery successfully assigned to the customer')");
         output.println(" </SCRIPT> ");
         output.println("</html>");
         output.println("</body>");
         return;
       }Thanks

    If that was true i wouldn't have a chance
    to make a javascipt alert box pop up.It is true. Your argument falls apart because Java, and servlets, having nothing to do with javascript, don't prevent, control, or modify javascript functionality.
    The point was, ask how to do the javascript functionality in a javascript forum. You might want to test it out on a couple static HTML pages first, because Servlets are just a means of delivering HTML content to the browser (if that HTML contains javascript or not).

Maybe you are looking for