Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Implement SOTag using ajax #22

Open
cyberjetx opened this issue Apr 7, 2015 · 2 comments
Open

Implement SOTag using ajax #22

cyberjetx opened this issue Apr 7, 2015 · 2 comments

Comments

@cyberjetx
Copy link

How can I implement the SOTag plugin in an online CMS environment where I do not have rights to deploy .net/php etc. I want to fetch the tags with an ajax call and pass those results to SOTag.

Quite sure the meat of what I need is to overload the following function to allow a autocomplete_method, autocomplete_var or a setting that allows a contained data source. I am not new to js but I can't get my head wrapped around this.

$.getJSON(settings.autocomplete_URL, { q: elem.val() }, function (json_data) {
I do understand that there is ajax happening inside the json_data call. I want to expand the plugin capability.

Started a fiddle http://jsfiddle.net/Cyberjetx/pe8okeb8/

@adamtester
Copy link
Owner

So you want to get the results from a JSON file? I suppose you can point directly to a static JSON file but the search wouldn't work as its done server side, you would have to write some regex to search through it to bring the top 6 results back.

@cyberjetx
Copy link
Author

I am pulling from a data source with an existing API. I can manipulate the xml data to create the proper JSON string format (ID, title, description). Can I point to a method that could get the filtered data? That would rock in an epic way.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants