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 9002249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:32:41+00:00 2026-06-16T00:32:41+00:00

I have a bootstrap page that lists items in a table. Each item has

  • 0

I have a bootstrap page that lists items in a table. Each item has its own delete link that launches the modal.

<a href="#modalDel" data-idtodelete="<?php echo $value->id; ?>" class="deletelink">
Delete this item
</a>

...

jQuery("a.deletelink").click(function(event){
    var id2del = $(this).data('idtodelete');
    jQuery("#myModalLabel").html("Delete item: "+id2del); //works great
    jQuery('#modalDel').modal('show');
});

I can pass data to the modal easily, but now I have to make the main button in modal to reflect the dynamic url and call to it (only) when this button is clicked

Any ideas? Thanks

PS: cannot use the hidden event for this, because modal can also be hidden with the cancel button. Also, modal should be closed after/before calling the dyn. delete url of main button

  • 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-06-16T00:32:42+00:00Added an answer on June 16, 2026 at 12:32 am

    I’ll hazard a guess at this. Haven’t tested because I’m not really sure about the setup.

    var $ = jQuery; // using as a shortcut
    
    $('#modalDel').on('show', 
           function()  {
              // Composes delete URL with arguments
              var dynUrl = composeUrl(args); 
              // assuming the modal button is an anchor element
              $('#modalButton').attr('href', dynUrl); 
    
    
              // Also closes the modal box after being clicked
              $('#modalButton').on('click', 
                  function(e) { 
                       $('#modalDel').modal('hide');
                  });
    
           });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed one page in my site using twitter bootstrap. In that I
I have a page that I have started building with the Twitter Bootstrap css
I have a page with a table that can have different number of columns.
I am using twitter bootstrap and have a fixed nav bar. The navbar has
I have an app that is using twitter-bootstrap and I am trying to implement
I have a site that is using bootstrap and ScrollSpy nav to scroll to
I am using Twitter bootstrap for the CSS of a page where I have
I have an existing event heavy page that I am trying to add typeahead
I have a log in form that appears at the top of the page.
I have a widget on a page that calls another script for source. Like

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.