URL disrupting ajax requests

-4

I have a system that defines the url according to the link that the user clicks, and makes an ajax request and returns the content only that the url hinders the request.

For example: The user clicks a link and the url is modified to localhost/urlclickada but the ajax request should go to localhost/sys/funcoes.php and it goes to localhost/urlclickada/sys/funcoes.php .

I have tried to put bar in front of url $.post("/sys/funcoes.php") or $.post("../sys/funcoes.php") .

    
asked by anonymous 27.10.2016 / 13:07

1 answer

0

Try $.post("./sys/funcoes.php")

    
27.10.2016 / 15:10