Problem with check field in ajax
- Date added:
- Sunday, 12 April 2009
- Last revised:
- Friday, 22 May 2009
Answer
If your website is in localhost or in a sub-directory (not at the root of your domain or sub-domain), the validation by ajax JQuery can work not properly. Just edit the file named ajax-check.js located in <your site>/components/com_alpharegistration/assets/scripts.
Search this first lines below :
var myDomain = '';
if ( document.domain!='localhost' ) {
myDomain = /(http?:\/\/[^\/]+)/.exec(window.location.href)[1] + '/';
}
and replace by
var myDomain = 'your url/'; // example : var myDomain = 'http://www.xxxxxxx.com/xxxxx/' or var myDomain = 'http://localhost/xxxxxx/'
do not forget the last /
and comment the following lines like this
/*
if ( document.domain!='localhost' ) {
myDomain = /(http?:\/\/[^\/]+)/.exec(window.location.href)[1] + '/';
}
*/




