Okay, I have a JavaScript file with the following functions:
function AskReason() {
var answer = prompt(\"Please enter a reason for this action:\", \"\")
I had a similar problem where an absolute URL was needed but the reference broke when going from localhost to the production server. I resolved it by checking if a "localhost" string exists in:
var environ = window.location.host;
Then you can simply do:
if (environ === "localhost") {
var baseurl = window.location.protocol + "//" + window.location.host + "/" + "shared/";
} else {
var baseurl = window.location.protocol + "//" + window.location.host + "/";
}
Then you can add baseurl in front of whatever url you need to reference.