Jump to content

will only execute when the URL in browser has www.


seany123

Recommended Posts

i have this code:

 

function register()
{
hideshow('loading',1);
error(0);

$.ajax({
	type: "POST",
	url: "http://www.domain.com/submit.php",
	data: $('#regForm').serialize(),
	dataType: "json",
	success: function(msg){

		if(parseInt(msg.status)==1)
		{
			window.location=msg.txt;
		}
		else if(parseInt(msg.status)==0)
		{
			error(1,msg.txt);
		}

		hideshow('loading',0);
	}
});

}

 

and it works perfectly well, but only when the url on my website is eg: www.domain.com it DOESNT work if my domain is domain.com

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.