it's a regular url (www.somesite.com/somepdf.pdf) and it seems to be
adding that '?jsonp_callback=?' with the code i have above.

I'm trying to do it without server-side script.

Has anyone tried this?

On Apr 22, 4:49 pm, James <james.gp....@gmail.com> wrote:
> Oh, and to answer your question, I think when your results are not in
> the format specified for jsonp, regardless of whether the file exists
> or not it will still go to the error callback.
> By the way, what is the 'url' that you're using? Are you adding the '?
> callback=?' I've never tried this out, before though.
>
> On Apr 22, 10:46 am, James <james.gp....@gmail.com> wrote:
>
> > I personally suggest, instead, you set up a server-side script on your
> > own server that checks the remote file for you. Then you can use AJAX
> > to call that script to get the results.
>
> > On Apr 22, 10:30 am, switch13 <peter.w...@gmail.com> wrote:
>
> > > I'm trying to see if a pdf file exists in a directory on another
> > > server. If it does, do one thing, if not do another.
>
> > > Here's what I tried:
> > >                 $.ajax({
> > >                         url: url,
> > >                         type: 'GET',
> > >                         dataType: 'jsonp',
> > >                         jsonp:'jsonp_callback',
> > >                         error: function () {
> > >                                 
> > > $('.Row').eq(i).children('td:eq(2)').append(file_unavail);
> > >                         },
> > >                         success: function(){
> > >                                 
> > > $('.Row').eq(i).children('td:eq(2)').append(file_avail);
> > >                         }
> > >                 });
>
> > > I can get it to work on the same server by removing the dataType and
> > > jsonp but I was search around and read that the jsonp would allow me
> > > to get around the Access to restricted URI denied" code: "1012
>
> > > I'm I doing something wrong? Is it possible to do what I'm asking with
> > > jQuery?

Reply via email to