try $.getJSON since you want to get json data somthing like
 $(document).ready(function(){
                       $("#peep").click(function(){
.getJSON(url,   { request:'tes',message:'SupLawl' },   function(json)
{     alert(json.msg);   } );

});
});


On Sep 23, 6:57 pm, Bockit <[EMAIL PROTECTED]> wrote:
> Can't work this out myself so turning to others, chances are I'm
> missing something small, but let's see.
>
> I'm trying to use the $.ajax() function in my app, however it just
> isn't sending the GET data when I click on the link.
>
> $(document).ready(function(){
>                         $("#peep").click(function(){
>                                 $.ajax({
>                                         url: 
> "http://bockit.dyndns.org:8081/peep/servlet/peep";,
>                                         type: "GET",
>                                         dataType: "json",
>                                         data: "request=test&message=SupLawl",
>                                         error: function(){
>                                                 alert("woops");
>                                         },
>                                         success: function(json){
>                                                 alert("worked omg: " + 
> json.msg);
>                                         }
>                                 });
>                         });
>                 });
>
> Could anyone take a look at that and tell me what I'm doing wrong?
>
> At the moment the server isn't even registering a request, at all. If
> I manually type the url into the address bar, the server gets the
> request, and it runs through its motions properly, so I know the
> problem is somewhere in that code.

Reply via email to