Define what "not working correctly" means.
Does it cause an error? Does the request get sent but nothing happens?
Does the request get sent without the GET data? ... etc.

On May 12, 12:00 pm, Nahaz <pierre.christoffer...@gmail.com> wrote:
> I have this snippet:
>
> function ajaxAdd() {
>         $('form').submit(function() {
>                                    var nick = document.register.nick.value;
>                                    $(':submit', this).attr('value', 
> 'Adding...');
>                                    $(':submit', this).attr('disabled', 
> 'disabled');
>                                    $.ajax({
>                                                   type: 'GET',
>                                                   url: 'data.php',
>                                                   data: 'nick=' + nick,
>                                                   success: function() {
>                                                           $(':submit', 
> this).removeAttr('disabled');
>                                                           
> $('#status').load('output.php');
>                                                           }
>                                                   });
>                                         });
>
> }
>
> that is sent when a very simple form (one value and button) is sent.
> The thing is, it works on my local webserver, but when I upload it to
> my webhost, it wont work. It works if add data.php?nick=Test, then the
> data will be added into my database but not when called from .ajax.

Reply via email to