You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.
Hello, Sorry for my poor english.
I've to set in the search bar the value of the column "Nome" but post the value of Column "ID" with a POST form.
This is the code:
<script>
jQuery(document).ready(function(){
jQuery(".mySearch").ajaxlivesearch({
loaded_at: ,
token: getToken() . "'"; ?>,
max_input: ,
onResultClick: function(e, data) {
// get the index 0 (first column) value
**//Here i select the column "0" which is the ID but i want to show at the user the name of the product, so the Column "1"**
How can I show to the users the name but post ID value to the next step?
var selectedOne = jQuery(data.selected).find('td').eq('0').text();
// set the input value
jQuery('#ls_query2').val(selectedOne);
jQuery('#ls_query').val(selectedOne);
// hide the result
jQuery("#ls_query").trigger('ajaxlivesearch:hide_result');
},
onResultEnter: function(e, data) {
// do whatever you want
// jQuery("#ls_query").trigger('ajaxlivesearch:search', {query: 'test'});
},
onAjaxComplete: function(e, data) {
}
});
})
</script>
Thanks!
The text was updated successfully, but these errors were encountered:
<script>
jQuery(document).ready(function() {
jQuery(".mySearch").ajaxlivesearch({
loaded_at: ,
token: getToken() . "'"; ?>,
max_input: ,
onResultClick: function(e, data) {
// get the index 0 (first column) value
**
// Here i select the column "0" which is the ID
but i want to show at the user the name of the product, so the Column "1"
** How can I show to the users the name but post ID value to the next step?
var selectedOne = jQuery(data.selected).find('td').eq('0').text();
// set the input value
jQuery('#ls_query2').val(selectedOne);
jQuery('#ls_query').val(selectedOne);
// hide the result
jQuery("#ls_query").trigger('ajaxlivesearch:hide_result');
},
onResultEnter: function(e, data) {
// do whatever you want
// jQuery("#ls_query").trigger('ajaxlivesearch:search', {query: 'test'});
},
onAjaxComplete: function(e, data) {
}
});
})
</script>
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello, Sorry for my poor english.
I've to set in the search bar the value of the column "Nome" but post the value of Column "ID" with a POST form.
This is the code:
<script> jQuery(document).ready(function(){ jQuery(".mySearch").ajaxlivesearch({ loaded_at: , token: getToken() . "'"; ?>, max_input: , onResultClick: function(e, data) { // get the index 0 (first column) value **//Here i select the column "0" which is the ID but i want to show at the user the name of the product, so the Column "1"** How can I show to the users the name but post ID value to the next step? var selectedOne = jQuery(data.selected).find('td').eq('0').text(); // set the input value jQuery('#ls_query2').val(selectedOne); jQuery('#ls_query').val(selectedOne); // hide the result jQuery("#ls_query").trigger('ajaxlivesearch:hide_result'); }, onResultEnter: function(e, data) { // do whatever you want // jQuery("#ls_query").trigger('ajaxlivesearch:search', {query: 'test'}); }, onAjaxComplete: function(e, data) { } }); }) </script>Thanks!
The text was updated successfully, but these errors were encountered: