Is it possible to use ajax to request a password protected page, pass credentials, and then get the html from the resulting page? I've been playing around with my asp.net mvc application and so far i haven't been able to get it working. here's what my view looks like:
@Code
ViewData("Title") = "Index"
End Code
<h2>eWeb Job Count</h2>
<div id="mydiv">
</div>
<script type="text/javascript">
$(document).ready(function() {
$.ajax({
type: "POST",
url: "http://102.143.240.117/dataviews.asp",
data: "'Administrator', 'password'",
datatype: "html",
success: function (dataviewhtml) {
$('#mydiv').html(dataviewhtml);
},
error: function (errorMessage) {
$('#mydiv').html(errorMessage);
}
});
});
</script>
when i load the page, i don't get any error messages... just a blank page. is it possible to pass data to a pop up window via ajax? thanks