jQuery ajax works on local but not on server

Posted by anjan on Stack Overflow See other posts from Stack Overflow or by anjan
Published on 2010-06-09T17:10:09Z Indexed on 2010/06/09 17:12 UTC
Read the original article Hit count: 223

Filed under:
|

Hi All!

I m actually put of my min with this code ....

$.ajax({
                'url'               : site_root + '/ajax.php',
                'type'          : 'POST',
                'data'          : 'function=check_user_login_name&user_login=' + user_login,
                beforeSend  : function()
                {
                    $('#check_result_span').html('Checking ...');
                },
                success         : function(data)
                {
                    if(data != 1)
                    {
                        $('#check_result_span').addClass('green').html('Available!');
                    }
                    else
                    {
                        $('#check_result_span').addClass('red').html('Already taken!');
                    }
                }
            });

This works fine on local machine, but not on server ...

the server page link is http://onlyfreelancer.com/signup.php

Please click on the "Check availability" link, nothing happens on server but on local it shows if the user login name is still available or not

Any help plz?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about AJAX