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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:13:54+00:00 2026-06-15T21:13:54+00:00

This is my first bootstrap/jQuery application. I have an app that displays multiple addresses

  • 0

This is my first bootstrap/jQuery application.

I have an app that displays multiple addresses for a person and each address is editable by an Edit button.

I cannot figure out a way to click “edit” and then have ajax call a script to load that specific data from the database and then place it in a twitter modal window.

The edit button code is:

a class="btn btn-small open-EditAddress" data-toggle="modal" data-id="#custom.addr_id#"         href="##edit_address_modal"><i class="icon-pencil"></i> Edit</a>

Each edit button passes the Addr_id, which would then trigger a twitter modal window with the data filled in for editing.

I have the modal edit firing, but not sure what to do next to load the external data into the modal for updating.

http://i.imgur.com/5ig3k.jpg

http://i.imgur.com/Oi98S.jpg

Can anyone assist with the jQuery to call the external data and load it in the modal?

  • 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-15T21:13:55+00:00Added an answer on June 15, 2026 at 9:13 pm

    update your Edit link to look like this so that it does not trigger showing a modal when clicked:

    <a class="btn btn-small open-EditAddress" data-id="#custom.addr_id#" href="/ControllerName/ActionNameToGetAddressInfo/[locationId]" data-ajax="true" data-ajax-mode="replace" data-ajax-update="#ModalEditAddress"><i class="icon-pencil"></i> Edit</a>
    

    You don’t want to do that because you will be triggering that separately via JQuery after loading your form.
    Also notice all these extra data attributes. They will enable an ajax call to populate your modal div with needed information.

    Somewhere on the page you should have your modal element:

    <div id="ModalEditAddress" class="modal hide fade">
    </div>
    

    It is empty because it will be populated with an ajax call to the following Action:

    public ActionResult ActionNameToGetAddressInfo(int id) // locationId
    {
        var model = [get all the address information from DB or however you get it];
        return View("~/Views/[ControllerName]/_EditAddress.cshtml", model);
    }
    

    Here is your partial view _EditAddress.cshtml:

        @using(Ajax.BeginForm("[ActionNameToSaveAddress]","[ControllerName]", new AjaxOptions{...}))
        {
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h3>Edit Address</h3>
            </div>
            <div class="modal-body">
                [all the form related inputs]
            </div>
            <div class="modal-footer">
                <input type="submit" value="Save Address" />
            </div>
        }
        <script type="text/javascript">
            $('#ModalEditAddress').modal('show');
        </script>
    

    So far when you click on the edit link, it will trigger an Ajax call Action ActionNameToGetAddressInfo and put its results into div with id="ModalEditAddress". When this happens it will run the script at the very buttom of the partial view and show the modal.

    You will have to write another action to save address and some JQuery to hide modal when its saved.

    This is all pseudo code so some adjustments may need to be done to it so that it works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I feel so noob to ask this. Now, I have rails app that is
In my HTML head I first include jquery.min.js, jquery.couch.js and twitter-bootstrap js (in that
This is my first foray into Twitter Bootstrap. Take a look at this template
i have two arrays like this first array Array ( [0228] => Array (
Using Dozer to map two objects, I have: /** /* This first class uses
How to create in-app step by step instructions? Like this ( first boot android
I'm writing my first PHP app. Everyone talks about having a bootstrap.php to initialize
I would like to include both Twitter Bootstrap layout and jQuery UI scripts. First
I have a set of images that are loaded via jQuery AJAX. For some
While trying to use this jquery lightbox plugin for Bootstrap (click for source code),

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.