ajax post request url
<p>there is happening a bug in my app that isnt the first time that happen to be, i cant figure out why is doing it. I have a post request being made in a specific route, but in my app, instead making the ajax call to my specific url is send to the current url from tha page. 
My ajax code:</p>

<pre><code>$.ajax({
    method: 'POST',
    async: false,
    url: '/galleries/heatMap/'.idGallery,
    type: 'POST',
    data: {img: url, _token: token, idGallery: idGallery, productStat: productStat, tagStat: tagStat}
}).done(function (msg) {
    console.log("Save HeatMap");

    tagStat = {
        title: "",
        clicks: 0,
        product_id: 0
    };
    productStat = {
        clicks: 0,
        product_id: 0
    };
}).fail(function () {
    console.log("Error ocurred");

});
</code></pre>

<p>My current url where im making the post is: <a href="http://domain.com/models/1/embed/" rel="nofollow">http://domain.com/models/1/embed/</a></p>

<p>And for some reason the post is being made to '../models/1/embed/', instead the url of the ajax. Does someone have a idea what is happening?</p>