2

I want to create an iframe with other page visible inside. The page is outside my domain. Normally I do it like that:

$('<iframe />').attr('src','www.thepage.com?data=1').appendTo('body') 

But if www.thepage.com is accessible via POST instead of GET, how should I load it? $.ajax( type:'POST',...) fails due to Origin null is not allowed by Access-Control-Allow-Origin.

1 Answer 1

1

Load in a temporary page that contains a form with the fields you need (hidden) and use Javascript to submit the form.

This happens to be a previous question that I asked. Response.Redirect with POST instead of Get?

Look at the answer from Pavlo. You can see how he's creating an html page with a form that does a submit on load of the body.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.