Using GET and POST
Using GET and POST
Hi. I´m trying to send parameters to a site and get an xml response. The problem is that I dont get anything into my response. Any ideas why? This is how it looks like:
- method: function(){
- $.ajax({
- type: "POST",
- url: 'target_page',
- data: "arg0=do&arg2=more",
- dataType: 'xml',
- complete: function(xml){
- $(xml).find('existingTagName').each( function(){
- alert("something found!");
- })
- alert("xml="+xml);
- }
- })
- }
"something found" are never showing up but I get "xml=[object XMLHttpRequest]".
Can you see anything wrong with my code? Is it "POST" I am supposed to use?