I am using JSONP with code:
<script> $.ajax({ url:"http://localhost:8080/pool/main/?pool=abcd", dataType: 'JSONP', success:function(response){ $('#pool').append(response); }, error:function(){ alert("ERROR"); }, }); </script>
I need a JSONP user because I need ajax cross domain
My application response from " http://localhost:8080/pool/main/?pool=abcd " contains HTML code.
I wanted to display this code on my page, but there is an error because, as I assume, I cannot return html.
ERROR - I mean - this gives me this error:function(){ alert("ERROR"); } code error:function(){ alert("ERROR"); } error:function(){ alert("ERROR"); } , but I see in firebug that the response from my page http://localhost:8080/pool/main/?pool=abcd is fine. But sketchy. I do not know how to put the response to the html element.
My question is - CAN I NOT.
If I can - how to do it?
source share