Jump to content

$.ajax baseDir is not defined


Recommended Posts

Hi,

Currently I am working in a small module. In that I have a small query where I need ajax. For that I did my code like this

 



function deleteAttribute(id) {
    var id = id;
    $.ajax({
      type: "GET",
      url: baseDir + "/modules/mymodule/php/deleteteAttribute.php",
      cache: false,
      data: { id : id },
      success: function(html) {
        $(".success").html(html);
      }
    });
}


 

Here you can see I have used baseDir to get the directory path. But in console tab of firefox it is showing 

 


ReferenceError: baseDir is not defined

. So can some one kindly tell me how to fix this issue? Any help or suggestions will be really appreciable. Thanks

 

Link to comment
Share on other sites

×
×
  • Create New...