Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 958687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:54:24+00:00 2026-05-16T00:54:24+00:00

I am having a confirmation box after clicking on the Delete link in the

  • 0

I am having a confirmation box after clicking on the “Delete ” link in the jsp. Now the problem is that the success deletion page is showing in the same window.

I would like to show it in a pop up window.

I tried to use the javascript onclick(), but it is not wotking. So, how can I do that?

<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="jconfirmaction.jquery.js"></script>


<script type="text/javascript">

            $(document).ready(function() {


                $('.ask-plain').click(function(e) {

                    e.preventDefault();
                    thisHref    = $(this).attr('href');

                    if(confirm('Delete this record?')) {
                        window.location = thisHref;
                    }

                });

                $('.ask-custom').jConfirmAction({question : "Anda Yakin?", yesAnswer : "Ya", cancelAnswer : "Tidak"});
                $('.ask').jConfirmAction();
            });

        </script>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />


<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=750,height=430,scrollbars=no');
return false;
}
//-->
</SCRIPT>

---Delete image
<td  width="3%" align="left"><a href="cir_delete.jsp?cir_id=<%=rs.getString("cir_id")%>" class="ask"><IMG SRC="12.png" ALT="Delete" BORDER="0"></a></td>

Thanx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T00:54:25+00:00Added an answer on May 16, 2026 at 12:54 am

    when you click on delete, the confirmation box is shown and afterwards the form is submit.

    What you need to do is submit the form trough jquery, cathc the result and show pass it to a popup box. I will give an exmaple soon.

    I have done this once with jconfirm:

    <script type="text/javascript">
            $(document).ready(function(){
                // give all your delete links a class="del" then when this is clicked, execute following:
                $(".del").click(function () {
                //get the href from th link you clicked
                var href = $(this).attr("href");
                    activate JConfirm
                    jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
                      // if confirm is clicked: 
                      if(r){
                           //post the form serialised to the url
                           $.post(href, $("#yourtestform").serialize(),
                              function(data){
                                // the posted form will return html data, load this data in a hidden div
                                $('#loadhtml').html = data;
                                // now that the data is loaded, open a colorbox with the hidden div as content (don't forget to include the colorbox.js
                                $('#loadhtml').colorbox();
                              };
                           );
                       }
                       //if the person clicked cancel: do nothing
                       else{
                            return false;
                       }
                    });
                    // insure that the form doesn't post itself again after jquery is finished
                    return false;
                });
            });
        </script>
    

    I assume you want to use a modal popup like colorbox or something
    define a div at the bottom where you can load html in after the post and hide it:

    <div style="display:hidden" id="loadhtml">
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am having a problem with the way that i am trying to delete
I'm having a problem with submitting a form and Javascript confirmation. Basically, the following
Having worked with Classic ASP for about 2 years now by creating a few
Having a problem getting a TreeView control to display node images. The code below
i'm having list of user with check box, so the function is at least
Ok so I am having a problem with doing multiple forms in rails. here
Having a problem while passing messages using content scripts in Google chrome extension dev
Having spent a bunch of time recently doing 2D work that involves pixel manipulation
Having a bit of a problem with mysql... Mysql 5.1 on windows 2008 server
After having read Ian Boyd 's constructor series questions ( 1 , 2 ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.