Plugins

User login
Can't find a Plugin?

Can't find a Plugin you are looking for? Check out the jQuery Wiki page.

Are you a plugin developer? Please move your plugin over to this site.

Website Bug or Feature Request?

Found a bug on the new jQuery Plugin website? Have a feature request?

Submit it to the jQuery Plugin website issue queue to ensure it is noticed!

ajax


Project:jQuery AutoComplete
Version:1.0.1
Component:Code
Category:support request
Priority:critical
Assigned:Unassigned
Status:active
Description

This new project looks very impressive and the demos look to work well.

I'm having a problem though with trying to access remote ajax data in the manner shown in the example at http://reinh.com/2008/1/7/new-jquery-autocomplete-plugin.

There are 4 demos shown in the example: the 2nd one using JSON data preloaded from a local file source and the 3rd one (demostrating ajax) supposedly sourcing it's data using an http url. I've tested this by making a local copy of the html file, together with its json file and changing the urls for the js and css files so as to point to the files hosted at ReinH.com. At first sight that works well. I then change this local json file slightly (to tell it apart from the one accessible via the http url) and hope to find that the 2nd demo will be attached to the local dataset and the 3rd demo will instead be attached to the remote one. Instead, I find that they are both effectively sourcing their data from the same local set and all attempts that I've made to ensure that the 3rd demo attach to the remote set via http fail. Is there a problem with 1.0.1 in this regard or am I failing to come to grips with jQuery which is new to me?

Various attempts of mine have included the following:

  • specifying the http url in the line $.getJSON('../json',
  • specifying it as the list parameter
  • specifying it as the ajax parameter
  • I've tried separating the js functions for the preload and ajax elements, connecting the preload one to the local dataset and the ajax one to the http url

Whatever I do it always fails to retrieve any data when I change the url from a local file to an http address.

Thanks in advance

Comments

#1

The page you referenced no longer exists. Do you remember what the example looked like? And what kind of url are you trying to fetch data from? Is it a path local to the current server or on a different host? (i.e. /give/me/data or http://a.different.host/with/tasty/data)