Can we use AJAX to submit a https request in a http page?
E.g.
1. Open a page: http://localhost/test.html.
test.html code:
2. Then run test script to submit a https request
the response status is 0. and the response test = ""
How can we add the SSL exception from a ajax response?
E.g.
1. Open a page: http://localhost/test.html.
test.html code:
Code:
<html>
<head>
<script src="script/sys.js" language="JavaScript" type="text/javascript"></script>
<script src="script/prototype.js" language="JavaScript" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">
function test() {
//var url = "http://localhost/ajax?xxxx";
var url = "https://localhost/ajax?xxxx";
new Ajax.Request(url, {method: "get",
onComplete: function(transport) {
alert(transport.status + ": " + transport.responseText);
}
});
}
test();
</script>
<form action="https://localhost/ajax?xxxx" name="xx">
<input type="submit" value="submit">
</form>
</body>
</html>
the response status is 0. and the response test = ""
How can we add the SSL exception from a ajax response?
Comment