I have a quick question regarding AJAX requests and Posts.
Let's say I have a website called www.mysite.com and I make this AJAX post:
$.ajax({
type: "POST",
url: 'www.mysite.com/post.php',
data: {msg:"Hello world"},
cache: false,
success: function(response){
alert(response);
}
Ok now this works perfectly fine, but let's say I wanna change my domain name, to something more exciting, like www.myamazingwebsite.jeff I'd need to replace that URL in every AJAX request/post I ever made. That can become very annoying.
Isn't there a variable like %CurDomain or %CurPath to get the current domain name or the current path to the JS file the AJAX post is being made in?
That would allow me to NOT change those URLs