-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
typeerror typeahead.process is not a function #40
Comments
Try Note i tried some basic example which seems to work as expected, see the following code:
See also: http://timschlechter.github.io/bootstrap-tagsinput/examples/ |
I removed the reponse. Works fine now. I guess i didnot need it in first place. Thanx for your help. |
The code shown below uses the
Bootstrap tagsinput use the source parameter only. When using this
Notice Bootstrap tagsinput's examples also show an example such as: |
Im a new for bootstrap3 and thypeahead.Did u have any example about event like onSelected or onFocus? |
@taudender also check the original Programmatic APIhttp://getbootstrap.com/2.3.2/javascript.html#overview. How to questions can also ask on stackoverflow: and so on... |
I tried all yours link before, but it seem doesn't work. |
Can you post the example code you already have? |
i want to use event like focus,open,close. but looklike nothing happen. |
Hi @tuarender, Thanks for posting your code. You also referrer to twitter/typeahead.js. Please notice the repository contains the typeahead plugin which original was built-in in TB2. TB3 drops support for this plugin in favor for twitter/typeahead.js. You can not use the documentation of twitter/typeahead.js for the plugin in this repository. Also notice the plugin don't have any open / close event. The plugin implements a select and focus function (event). You can set the select function as an option (the focus not), but you have to realize that this removes the original focus event:
Alternatively you can extend either the select and focus function to keep it's original functionality by using the following code:
|
Hi Bass, Thanks, |
Sorry, i did not found an other solution. This kind of problems seems related to mdbootstrap/bootstrap-templates#44 in the first place. You can write a "proxy" for your source which does the sorting and item manipluations. If your source is source.xml, than try proxy.php:
now call proxy.php as your source. |
Ok, for now I changed the tagsinput javascript source code - that's an easy but hack way though! |
@bassjobsen thx you :) 👍 |
Hello, Can somebody explain how to attach dynamic remote URL with json which will be rendering new results based on inputed query? Right now I have: $.get('my_url?query=abcd', function(data){ works fine but the query paramter is static right now. How to make it dynamic based on user query? |
Hi everyone, I'm trying to use Bootstrap 3 Typeahead and Bootstrap tags input together, with an external source of data.
But when I try to use a dynamic remote URL, it doesn't work anymore. My JS code is now:
My remote URL is a PHP file with a MySQL query, which returns a json encoded array, with the exact same syntax as the above source, for example the result of tagsearch.php?query=tag is:
But when I use this code, here is the result: Could anyone please help me ? I can't undestand what is wrong... Thanks ! |
Ok, I figure it out. The return of my PHP file wasn't considered as a json. I had to add items = JSON.parse(items); in the processItems function in Bootstrap tagsinput's source function:
I'm far from being an expert at Javascript, so I don't really understand why, but it works perfectly now. Sorry for that... |
This tripped me up too, you almost had it. source: function (query, process) {
return jQuery.get('tagsearch.php?query=' + query, function(data){
return process(data);
});
} |
@jared-christensen, thanks for sharing your code. I was getting an error though saying that process was undefined. Just included process as an argument, and viola!
|
@nicholasblexrud Thanks, I left that off by mistake. I will also fix my example, just incase someone would try to use it. |
I use the script mentioned above but it always returns me the first suggestion from the array when I have more |
I want to select by clicking on the trigger event, how can I do? |
My working example here (with bootstrap tagsinput+bootstrap typeahead) If the first letter appears only than you can use that line from example: Good luck! <script>
$( document ).ready(function() {
/**
* Typeahead
*/
var elt = $("#'.$vinput_id.'"); //tagsinput input
elt.tagsinput({
typeahead: {
afterSelect: function(val) { this.$element.val(""); },
source: function(query) {
var result = null;
$.ajax({
url: "URL/TO/JSON/SOURCE&term="+query,
type: "get",
dataType: "html",
async: false,
success: function(data) {
result = data;
}
});
console.log(result);
return JSON.parse(result);
}
}
});
});
</script> |
Hello, // including scripts .... Well, it seems to work and when I type something, the suggestions appear, but when I press enter on one of them, the input creates 2 tags: one with my 'unfinished typing' and other with the suggestion chosen. ~ Sorry for my english... ~ |
Bootstrap-3-Typeahead don't work with bloodhound in case of remote url, I edited the line 136 : |
How to choose first Item when user choose anything |
Hey guys...
source.php This error is occured in Mozillah Console when i type something in search field " Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help http://xhr.spec.whatwg.org/ jquery.min.js:4:15668 |
For some reason I get this error. Uncaught ReferenceError: Bloodhound is not defined any clues? |
I am having trouble integrating bootstrap 3 typeahead with tags input but These are the modules i am using $('#text').tagsinput({ |
first, please accept my congratulation for the awesome book on bootstrap. i am trying to increase the list items of the bootstrap typeahead. I made following attempts
But typeahead always returns only 10 items no matter what. Is this a bug or I am doing something wrong. Kindly help. |
Hello, I need the element name: 'value' to autocomplete the input text 't03_name' and the code: 'value' element to autocomplete the hidden input 't03_idMember'. how to make? HTML |
@mjbezer Maybe this can help u out
}) |
I use I try 3hours, the trick is typehead source need return ajax object.
|
typeahead: {
I am using this typehead with bootstrap tagsinput. I am getting " typeerror typeahead.process is not a function " error when i query .
$('#mystuff_tag_box').tagsinput({
typeahead: {
source: function (query, process) {
return $.getJSON(
'{% url "autocomplete_tag" %}',
{ term: query },
function (data) {
return process(data);
});
},
})
If i try only typeahead then it works fine. But does not work with bootstrap tagsinput.
The text was updated successfully, but these errors were encountered: