$.ajax – little help needed

$.ajax – little help needed

Guys,

I’m trying to make $.ajax work (jquery-1.5.js – the most stable ;-) – no luck at all.

Getting completely different behavior in FF and IE

The page in on localhost (http), getting cross-site request via $.ajax (http, https) (what could be simpler than that?)

 

IE8 – works for http

IE8 – access deny for https

 

FF – send OPTIONS instead if GET request for both http/https

 

Code snippet:

 

                jQuery.support.cors = true; // force cross-site scripting (as of jQuery 1.5)

 

$.ajax({

                                                type: "GET"

                                                , crossDomain: true

                                                , url: "http://something"

                                                //, url: "https://something"

                                                , success: function (data, textStatus, jqXHR) {

                                                                $('#ex1_result').html(data);

                                                }

                                                , error: function (xhr, status, errorThrown) {

                                                                debug(xhr.responseText);

                                                                debug(status);

                                                                debug(errorThrown);

                                                }

                                });