Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete option #8

Open
nitsuga111986 opened this issue May 27, 2012 · 3 comments
Open

Autocomplete option #8

nitsuga111986 opened this issue May 27, 2012 · 3 comments

Comments

@nitsuga111986
Copy link

Hi, I would like to know if AUTOCOMPLETE could get the data from DB, and how...

Thanks in advance!

@djpate
Copy link
Owner

djpate commented May 27, 2012

Yes it works with data from the DB but the db script has to be written in some server side language(php, ruby etc..)

@nitsuga111986
Copy link
Author

Do you have some example? because I am trying to implement this part but it doesnt work, I did this:
$("#img").tag({
defaultWidth:200,
defaultHeight:200,
autoShowDrag : false,
showTag : 'hover',
autoComplete:[
$.post("ajax.php",{'action':'tag_recover'},function(){
data;
})
]
});

in the ajax file, I did this:

switch($_REQUEST['action']){

    case 'tag_recover':
        echo "'uncle1 jack','baby1 john'";

}

But when I write something in the input, I receive this error: (on firebug)

Permission denied http://localhost to charge the property XMLHttpRequest.channel
http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js
Line 28

@nitsuga111986
Copy link
Author

Hi again DjPate, I write again, because I did not find the solution for solve my problem, do you know how could I get data from database to use in autocomplete?

Thanks in advance,
best regards :D

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

No branches or pull requests

2 participants