3
My request:
$.post(
"http://painel.thomerson.com.br/imagens/escolher-template",
$(this).serialize(),
function(data){
$("#Resultado").html(data);
}
);
What is happening is that by inserting the contents of the variable data
à div #Resultado
, is being inserted the full html code of the page itself, I wonder if there is any way to return another type of data.
Screen before Ajax request:
Screen after Ajax request:
There was duplication of the whole script :/
I saw some examples that returned data on JSON
, bringing only what is necessary for manipulation, but I could not understand very well how it was done, I hope to have been clear, otherwise, comment and I will edit what is necessary.
What are you trying to get?
JSON
,html
orxml
? What is the purpose of this request? It is not clear what you are trying to do.– Oeslei