I made a jQuery function and in the passage of the URL it is not finding the file. I found it strange that he did not find it because the file exists.
Every call I have inside the site is always the same, either src
or href
, the call is the same, like this:
../../pasta_base/pasta_secundária/nome_do_arquivo.asp
To give an example in my case, I do this:
../../prs/asp/prs0061b_crossbrowser.asp
.
This form works and I can find the file. That's the way it's all over the site. However, when I call through jQuery, I get the error 404, page not found .
I do not know if it has to do with being in a jQuery function. As we are rewriting the site, to work in Chrome, there is no jQuery function the way I did it, this is the first one. Here's how my function works:
function CarregaTabela() {
var str = "";
$.ajax({
url: '../../prs/asp/prs0061b_crossbrowser.asp',//aqui não acha nada
datatype: 'json',
contentType: 'application/json; charset=utf-8',
type: 'POST',
data: JSON.stringify({}),
success: function (data) {
//$(data.resultado_acao).each(function () {
})
},
error: function (error) {
}
})
}
I just want to know, if what I've done is correct, if that's the way it is. I do this with MVC, but there in the URL I put action/controller
, now with direct file I do not know if it is correct. It's classic ASP.