1

I have in my website a object html like so:

 <object id="objetoPag" type="text/html" data="http://www.example.com/index.php"></object>

and in this tag there is a form with some inputs.
When I click the submit button inside the object tag the response will be a big XML.

how could I retrieve the XML and control when the submit has ended?

I understand that the object tag has some restrictions so I tried changing it to a iframe instead.

UPDATE

I used ajax like the following:

$http.post("http://phpfile.php",params).success(function(data){
            console.log(data);
   })

But I am getting a 'Access-Control-Allow-Origin'

dreid
  • 163
  • 2
  • 17
  • 1
    I would do it with ajax. You submit the form with ajax and you can wait the response from the server with XML data. – Giacomo M Dec 14 '16 at 10:17
  • thats.....a brilliant idea xD,goin to try that out – dreid Dec 14 '16 at 10:21
  • I added the ajax but now I am getting 'Access-Control-Allow-Origin', – dreid Dec 14 '16 at 11:03
  • 1
    iframes and object elements have the same security restrictions, XMLHttpRequest has similar security restrictions but with a different implementation. – Quentin Dec 14 '16 at 11:09

0 Answers0