Joshua4550 Posted October 13, 2010 Share Posted October 13, 2010 Hey, So. I wanted to post to an external script (cross-domain) in JavaScript. This is not my domain, though it's a partner. I figured it would be SO MUCH easier to just post using jQuery's $.post() method, and problem solved. Well done! The problem was solved, until I ran it in IE - uh oh, IE doesn't like it? I researched this problem, and it seems it's an IE security problem with cross-domain blahblah. My question? How would I go about achieving the exact same result (just to post to the script, without actually making the user run it?) - I am not actually posting any _POST or _GET variables, I was only using $.post() because it was a convenient solution. My old attempt, which IE didn't like? $.post('http://External_Site.com/External_Script.php'); (Obviously that isn't the real URL) Any help? Much appreciation for all help =) Link to comment https://forums.phpfreaks.com/topic/215787-javascript-wjquery-post-a-page-request/ Share on other sites More sharing options...
Joshua4550 Posted October 13, 2010 Author Share Posted October 13, 2010 Figured. Created a PHP script which grabs the url defined in a _GET parameter, and used file_get_contents() to display the script output. This made me able to request a post to that script on the same domain. I posted back just to allow any future people looking for the answer to this to find. Thanks anyway Link to comment https://forums.phpfreaks.com/topic/215787-javascript-wjquery-post-a-page-request/#findComment-1121813 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.