I am using integrated authentication for a company intranet web site I'm building. All clients will be IE 6 or 7.
I've successfully built some ajax functionality using GET but now want to leverage existing pages that expect a POST. So I found code that does in fact work. But the wrinkle I get is that when I initiate the ajax request I am prompted for my credentials.
The site I am POSTing to is the same as the page I am on and the same as when I do GETs through ajax.
Is there something I can do to not be asked for my domain credentials? I searched the web and this forum for a while but was unsuccessful. The terms "integrated authentication" and "credentials" are not to be found in this forum, but are so common on the web that I can't zero in on any specific ajax authentication content.
Here's my code if you want to see it:
I actually will be processing the response text myself instead of sticking it in my popup's innerHTML, but for test purposes this is just fine.
I've successfully built some ajax functionality using GET but now want to leverage existing pages that expect a POST. So I found code that does in fact work. But the wrinkle I get is that when I initiate the ajax request I am prompted for my credentials.
The site I am POSTing to is the same as the page I am on and the same as when I do GETs through ajax.
Is there something I can do to not be asked for my domain credentials? I searched the web and this forum for a while but was unsuccessful. The terms "integrated authentication" and "credentials" are not to be found in this forum, but are so common on the web that I can't zero in on any specific ajax authentication content.
Here's my code if you want to see it:
Code:
function testReceive(xmlhttp) {
if (xmlhttp.readyState!==4) {return;}
$("popup2content2").innerHTML = xmlhttp.responseText;
xmlhttp = null;
}
function httpPost(url, params, stateChangeFunc) {
var xmlhttp = ajaxObj();
if(xmlhttp) {
xmlhttp.onreadystatechange = function(){stateChangeFunc(xmlhttp);};
xmlhttp.open("POST", url, true);
xmlhttp.setRequestHeader("Content-type", "application/x-[URL unfurl="true"]www-form-urlencoded");[/URL]
xmlhttp.setRequestHeader("Content-length", params.length);
xmlhttp.setRequestHeader("Connection", "close");
xmlhttp.send(params);
}
}
function popup2Action() {
var params = 'formpassthrough=' + escape(encodeURI('dataaction.asp')) + '&blah=' + escape(encodeURI('gorp'));
httpPost('[URL unfurl="true"]http://myserver/info.asp',[/URL] params, testReceive);
}