I'm running an ASP.NET application on a local intranet. One form has a button than uses AJAX to post a form in the background. I'm finding that when clicking this button for the first time I receive a network login prompt to access the web server. Once a valid network account is provided I'm not prompted again but obviously I don't want it to appear at all. Any ideas? The AJAX itself is:
Code:
var post_data = 'id=' + ie_id + '&locked=' + (locked ? '1' : '0') + '&budget=' + budget + '&phase_id=' + phase_id + '¬es=' + notes;
var http_request = InstanceOfHttpRequest();
if (http_request.overrideMimeType) http_request.overrideMimeType('text/html');
if (!http_request) return false;
http_request.onreadystatechange = function() {
if (http_request.readyState == 4) {
var response_text = (http_request.status == 200 ? http_request.responseText : '');
if (response_text == 'failed') {
alert('Error');
} else {
alert('Success');
}
}
}
http_request.open('POST', 'post.aspx', true);
http_request.setRequestHeader("Content-type", "application/x-[URL unfurl="true"]www-form-urlencoded");[/URL]
http_request.setRequestHeader("Content-length", post_data.length);
http_request.setRequestHeader("Connection", "close");
http_request.send(post_data);