Announcement

Collapse
No announcement yet.

Autosave a form when navigating to another record

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Autosave a form when navigating to another record

    I would like to automaticly save a form (so no need to clic on the save button) when my user navigate form page to page.
    I've done the following:

    I have created a javascript methode call sauvegarde
    nm_atualiza('alterar');
    return false;

    In the event onNavigate I've putted the following code

    /**
    * Call a Javascript function after an AJAX call
    */


    // Javascript function parameters
    $javascript_function = 'sauvegarde'; // Javascript function name
    $javascript_parameters = array( // Javascript function parameters, add as many as needed
    );

    // Call javascript function
    sc_ajax_javascript($javascript_function, $javascript_parameters);

    But, it does'nt work.

    Does someone have an idea ?

    Thanks

    Sylvain

  • #2
    It does not work because onNavigate is executed at coming to the next record and not by leaving the current record.

    jsb

    Comment


    • #3
      Thanks for your response. So what would be the correct event ?

      Comment


      • #4
        You can try a javascript event on leave focus or something.
        however , on navigate after leaving the record is a bug, because what is the purpose of it? we already have an onload/onload record event, so it is just double.
        it should be before leaving the record, so many practical applications ,
        sometimes i think sc develops the framework but does not have experience with serious applications of itsown framework.

        Comment

        Working...
        X