loading HTTPS page from an HTTP page using Ajax

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
bajinganindy
Forum Newbie
Posts: 2
Joined: Wed Aug 12, 2009 3:22 pm

loading HTTPS page from an HTTP page using Ajax

Post by bajinganindy »

Hello,
i'm fairly new to ajax. I have a page, 1.php, that loads 2.php using ajax. 2.php is protected by ssl and basic authentication, and 1.php is an unprotected page.
i've been trying to load 2.php using https with no luck.

if 1.php is loaded using https, 2.php would load up just fine(prompt user for username and password). however if 1.php is loaded using HTTP, the call to 2.php using HTTPS won't work using XMLHttpRequest.open

could someone point me to a right direction?
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: loading HTTPS page from an HTTP page using Ajax

Post by kaszu »

XMLHttpRequest won't work just like in case of different domain (cross-domain policy).
I'm not sure, but maybe this will help http://nb.io/hacks/csshttprequest
Post Reply