That's probably the "cache buster" parameter (added mostly for
Internet Explorer's benefit).

Use the $.ajax( { /* options */ } ); function (
http://docs.jquery.com/Ajax/jQuery.ajax#options ) and add cache: false
to the options. Like so:

$("form").submit(function() {
  $.ajax({
    dataType: "jsonp",
    url: "http://someplace.com?someparam=123&callback=?";,
    query: $("#query").val(),
    cache: false,
    success: function(data){ alert(data); }
  });
  return false;
});

Karl Rudd

On Fri, Dec 26, 2008 at 5:29 AM, mark <markj...@gmail.com> wrote:
>
> jrutter,
>
> I am having a similar issue with the Yahoo music api. In my case
> jQuery is replacing the url:
>   
> http://us.music.yahooapis.com/artist/v1/list/published/popular?response=main&appid=myappid&format=json&callback=?
> with
>
> http://us.music.yahooapis.com/artist/v1/list/published/popular?response=main&appid=myappid&format=json&callback=jsonp1230228631768&_=1230228631798
>
> As you can see jquery replaced the last ? with jsonp1230228631768
> (ok), but it also adds &_=1230228631798 (not ok) to the end. This last
> part is what Yahoo is flagging as a bad parameter. Some services, such
> as Flickr, simply ignore that last parameter.
> You may want to check if that is the same issue you are having, but
> unfortunately I don't know how to fix it...
>
> On Dec 11, 9:28 am, jrutter <jake.rut...@gmail.com> wrote:
>> What am I doing wrong? Im able to submit the request and get a
>> response, but in Firebug it says invalid label and the alert doesnt
>> show up.
>>
>> here is my code:
>>
>>       $("form").submit(function() {
>>
>>               $.getJSON("http://api.nytimes.com/svc/movies/v2/reviews/
>> search.json?api-
>> key=c82338627fba39e9bcb953728fe445a2:15:57546791&callback=?", {query :
>> $('#query').val()}, function(data){
>>                                       alert(data);
>>
>>               });
>>
>>          return false;
>>
>>        });
>

Reply via email to