CI + ajax |
I wanted to ask if is possible to call a modal and get a value from a ajax get request. Trying to do this gives me a 500 Internal Server Error.
Thanks.
Website : www.my-web-projects.com
No, you can't call a model, library, helper, etc, via the URL. You can only call controllers. So create a new controller, or add a method to and existing one, that will load your model and return your data when the ajax posts to it.
It is possible.
TS is asking create Modal, not asking get from Model. You can use it in view like this: HTML and JS: PHP Code: <div class="bs-example"> Controller: Sample_modal method get_ajax_result PHP Code: public function get_ajax_result() { |
Welcome Guest, Not a member yet? Register Sign In |