Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
send to controller from view and get result set without page refreshing
  • hello friends, i want to get jquery dialog to get result from database in selected id without page refreshing. please can i do it ? and how please help me.

  • Add the jquery javascript code to your view, and have it do an ajax call to a rest controller method, which can return the data in json format, which your javascript code can use to update the page.

    Just like any other application where you would do this.

    On the application side, create an API controller that extends Controller_Rest and have that return the data as json.

    A few tips:
    - think about security: what if a non-authenticated call is made to that API URI?
    - use Input::is_ajax() to prevent the URI being called by a browser.
    - make sure the ajax call defines the data type as json.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion