Test All Gadget, Z3X BOX Samsung, Miracle Box, Smart Phone Flash Tool, Stock ROMs, Android Tool, apps, Data Plans Internet

Sabtu, 01 Februari 2014

Displaying a Bootstrap Modal in Rails with an AJAX call

Displaying a Bootstrap Modal in Rails with an AJAX call - discussing about technology is my hobby, with media blogs Test All Gadget we can share the knowledge of technology that continues to grow with various ways of use that is intended to simplify your life, now we will discuss first about that in your search that is Displaying a Bootstrap Modal in Rails with an AJAX call please refer to our explanation because we will try to make a complete article for you.

Articles : Displaying a Bootstrap Modal in Rails with an AJAX call
full Link : Displaying a Bootstrap Modal in Rails with an AJAX call

You can also see our article on:


Displaying a Bootstrap Modal in Rails with an AJAX call

I am in the process of building a simple Learning Management Solution. I wanted to display a Bootstrap modal pop-up on click of the Add Capsules button. The idea was that on click of this button, an AJAX call should be made to the server, with the current Learning Path ID, so that it can query the DB, and find the potential capsules to be returned for the learning path. I would return an HTML snippet as response, which I wanted to insert into the body of the modal.

See screenshot below of how it looks:

Bootstrap Modal Pop up on click of Add Capsules button (with Ajax response body)












Check out this commit on Github to see the work that was needed: Bootstrap Modal Commit. The comment on the Github explains the details. It was actually quite easy once you know how.

I believe instead of sending an HTML snippet from the backend, a better practice is to send JSON data, and then construct the HTML at the browser via javascript. I guess, I could do that too, but this was really simple to do. I might modify it to return JSON some time in the recent future.

Reference:



enough already articles Displaying a Bootstrap Modal in Rails with an AJAX call

hopefully the information Displaying a Bootstrap Modal in Rails with an AJAX call that we submit on this blog can be useful for your life and all the people who visit this blog.

you just finished reading the article with the title Displaying a Bootstrap Modal in Rails with an AJAX call if you intend to bookmark or shre please use the link https://testallforone.blogspot.com/2014/02/displaying-bootstrap-modal-in-rails.html?m=1 and do not visit other pages on this blog because it still sangant a lot of information about gadgets from the old to the latest.

Tag :

0 komentar:

Posting Komentar