I have one text box where I have a remote typeahead setup. I can get the correct data pulled in, however when I post the text box is not in the data sent. If I remove the class that 'links' to the javascript the text box data is sent.
Here is my JS:
<script type="text/javascript">
$(function () {
var invoices = new Bloodhound({
datumTokenizer: function (d) {
return Bloodhound.tokenizers.whitespace(d.num);
},
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: '' + '?query=%QUERY'
});
invoices.initialize();
$('.overdue-lookup').typeahead('val', {
minLength: 1,
source: invoiceNumber.ttAdapter()
});
});
</script>
And my HTML:
<input class="form-control overdue-lookup" name="invoiceNumber" type="text" value="">
Not sure what I am doing wrong, if someone could assist me I would be grateful.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire