This topic contains 4 replies, has 2 voices, and was last updated by Sean Sean 2 years, 10 months ago.

Basis Ajax Example


  • knewron
    Participant

    Posts: 2
    Member Reply #3132

    hi, is there an example in the HTML version on how basic ajax updates can be performed. Eg. On a user click, an ajax request is placed that brings some data and updates the contents in a DIV.

    Apart from the basic documentation that you provide, are there any videos/documentation on how a developer can use this template for achieving various capabilities?

    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #3152

    Hi :),

    Thanks for your feedback on this. More advance demos and documentation will be available soon. However the ajax features are not too general so it depends on the actual requirements. If you can explain your requirements with more details i will try to advise you further.

    Thanks


    knewron
    Participant

    Posts: 2
    Member Reply #3178

    Hi,

    My specific requirement is to initiate an AJAX call to a server script, receive JSON data and display it in a DIV. While we do this sith Javascript,/JQuery, i want to know how this is done in the way metronic Javascript/Jquery script is coded. For example, how the metronic theme shows the progress indicator while the AJAX request is progressing etc.

    While we know how this is done, wanted to know how it has to be coded the Metronic theme way so that our application can follow the same styles and methods rather than adopting different ways.


    knewron
    Participant

    Posts: 2
    Member Reply #3203

    ?????????

    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #3229

    Hi :),

    Sure, for blocking and showing indicators you can use Metronic’s API referring to this demo page:

    http://keenthemes.com/preview/metronic/theme/admin_1/ui_blockui.html

    For example to block:

    Metronic.blockUI({
    target: ‘#blocking_content’,
    animate: true
    });

    To unblock:

    Metronic.unblockUI(‘#blocking_content’);

    Thus you can use any ajax code to retrieve data and process it while showing the loading indicator.

    If you need any further clarifications please let us know.

    Thanks.

Tagged: 

You must be logged in to reply to this topic.