diff --git a/html/ajax_card.php b/html/ajax_card.php index b3e81bdb2..16bd446cc 100644 --- a/html/ajax_card.php +++ b/html/ajax_card.php @@ -40,6 +40,7 @@ - fs Form to search card parameter like - inp : the input text field to update + - str : current content of the input text field (inp) - label : the element to put the name of the card - price : the element to put the price of the card (if exists) - tvaid : the element to put the tvaid of the card (if exists) diff --git a/html/js/card.js b/html/js/card.js index 24a632289..9cde9f9e8 100644 --- a/html/js/card.js +++ b/html/js/card.js @@ -38,6 +38,7 @@ function search_card(obj) { try{ var gDossier=$('gDossier').value; var inp=obj.inp; + var string_to_search=$(inp).value; var label=obj.label; var typecard=obj.typecard; var price=obj.price; @@ -50,8 +51,8 @@ function search_card(obj) { var query=encodeJSON({'gDossier':gDossier, 'inp':inp,'label':label,'price':price,'tvaid':tvaid, 'ctl':obj.popup,'op':'fs','jrn':jrn, - 'typecard':typecard - }); + 'typecard':typecard,'query':string_to_search + }); showIPopup(obj.popup); var action=new Ajax.Request ( 'ajax_card.php', {