Announcement

Collapse
No announcement yet.

sc_apl_conf("my_form", "start", "new"); + AJAX not working

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

  • sc_apl_conf("my_form", "start", "new"); + AJAX not working

    I am using the sc_apl_conf("my_form", "start", "new"); onAplicationInit to star my form on a new record.

    I am using the ajax event on change to update a Select value on this form and is not working, however when i remove de sc_apl_conf("my_form", "start", "new"); and click on the new record button the ajax events work just perfect and my Select fields reload excelente.

    Any ideas why is this happening?

    PS. The reload form does not work either couse when it reloads sets a new record and erases all the data.

  • #2
    I'm having the same problem.

    Comment


    • #3
      Onchange is an ajax event which needs to occur on the webform. That's why a click in the form works as expected. However, if you use the macro then this applies to the server side. It loads a webpage with new as initials state. That's something different imho.
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development
      www.scriptcase.eu / www.scriptcase.nl

      Comment


      • #4
        Hello,

        On form applications you should only use sc_apl_conf on onApplicationInit() or onScriptInit().

        Also notice that: "This macro must be used by one application to modify the properties of another application.

        http://downloads.scriptcase.com.br/d...tm#sc_apl_conf

        regards,
        Bernhard Bernsmann

        Comment


        • #5
          My friend, the event onAplicationInit put this code:

          if(!isset($_POST["start"])) {
          sc_apl_conf($this->nm_cod_apl, "start", "new");
          sc_redir(
          $this->nm_cod_apl,
          start=true,
          "_SELF"
          );
          }

          Comment

          Working...
          X