No ajax return from editor.on('open')

No ajax return from editor.on('open')

daniegloydaniegloy Posts: 35Questions: 12Answers: 5
edited February 2016 in Free community support

I need to get the return value of the new id and populate the field value of id, but im not getting anything back from ajax call.

editorNewForm.on('open ', function(){
var NewStockNr;
    $.ajax({  
            url: 'checkStockNr.php',                  //the script to call to get data          
                      //you can insert url argumnets here to pass to api.php
                              
            dataType: "json",  
            success: function(results){

              alert(results);

            }           
          });


  }); 

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin
    Answer ✓

    Just to confirm, the problem is that checkStockNr.php isn't returning anything? I'm not sure I can help much there since I don't know what is in that script.

    Allan

  • daniegloydaniegloy Posts: 35Questions: 12Answers: 5

    Fixed it. Thanks My php output was wrong

This discussion has been closed.