No announcement yet.

8.1 - Ajax buttons on form <-- how do they work?

  • Filter
  • Time
  • Show
Clear All
new posts

  • 8.1 - Ajax buttons on form <-- how do they work?

    Is there any documentation on how to use the new Ajax buttons?

    Shall I write JS or PHP code inside these new buttons?

  • #2
    That is what you can do indeed. We use the php button to open a popup window.
    In a php button you put php (of course). Just put an alert in your javascript button or some php code in your php button and that is it, it just simply works...
    Kinda simple...


    • #3
      @rr thanks.
      what is a bit misleading is that the header on the top of the coding are says "PHP code" but in the table above theres's this entry: "Type: Ajax -- Code language of execution."
      And AFAIK AJAX code is JS.


      • #4
        Ajax : asynchronous Javascript And XML


        • #5
          Can you give us a code snippet IT ? I don't understand your answer(s). I still don't know if I'm supposed to put PHP or JavaScript into an AJAX button that has "PHP Code" as the title of the code box.


          • #6
            You enter php in there (see the manual).

            Just make an ajax event on an editable field on for example the onClick event and add as code:

            That is about the simplest example you can find...
            You can basically hang your php code under it.