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

  • Home
  • SEARCH
  • 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 4538196
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:46:42+00:00 2026-05-21T14:46:42+00:00

Here is my jquery $(‘.delete_step’).live(‘click’, function(e) { e.preventDefault(); var delete_location = window.location.pathname.replace(‘admin/’, ”) +

  • 0

Here is my jquery

$('.delete_step').live('click', function(e) {
e.preventDefault();
  var delete_location = window.location.pathname.replace('admin/', '') + '?route=module/cart/delete_step';
  $.post( delete_location,  { step_id: $(this).attr("rel"), template_number: "<?php print $template_id; ?>" },
       function(result) {
            var token = window.location.search.match(/token=(\w+)/)[1];
           window.location.href = window.location.pathname + '/index.php?route=system/template&token=' + token;
  });
});

Here is my HTML

<span class="delete"><a rel="<?php print $step['step_number']; ?>" class="delete_step" href="#">Delete Step</a></span>  

How do I add a confirm yes/no dialog box around this….any ideas

  • 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-21T14:46:43+00:00Added an answer on May 21, 2026 at 2:46 pm

    Use window.confirm().

    $('.delete_step').live('click', function(e) {
        e.preventDefault();
        if (confirm('Are you sure?')) {
            // do the $.post()
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Learning Jquery here and I would like to show my SQL table on my
Just started learning Jquery - here's my problem: I have six divs on a
Hi very new to javascript here and jquery and absolutely don't know what I'm
I am looking to use Jquery UI button in my MVC Application. Could anybody
[updated] The 1st jQuery section below dynamically creates an a.open-popup element. But after I
I have a ASP.NET MVC project and i want to use jQuery on them.
Has anyone worked with the LiveUpdate function (may be a bit of a misnomer)
I am working with appending datarows. As they are appended, the entire tabe sort
I've got to add a new row with it's content populated from an ajax
i have a fileinput control in my html form, which automatically uploads an image

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.