I have 3 environments - development, stage and prod. I rely on jQuery for some ajax display. So I have something like that in my development:
function needsForcedReset() {
$.get("http://dev/_layouts/Ajax/DoesUserNeedForceResetPassword.aspx", function(result) {
alert('got the data from force password ajax page: ' + result);
if (result.toString().length > 0) {
showAlert('Your have to change your domain password now', 0,
false, false, notificationClass.fail);
return true;
}
return false;
});
return false;
}
So the point of interest is the hardcoded link inside the $.get function. How do I code with jQuery to make that link relative to the path of _layouts/ajax or code in the way that I dont have to specify the host for the url for each different deploy scenario?