Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By aura9k1
#816047
Good day,

I am trying to implement a Live search feature using a text input. As the user types in the text input, the list should filter based on the text typed into the text input.
Whenever I try to implement this outside of Processmaker, it works just fine, however when I do it in Processmaker, it only updates when the text input field loses focus. I have tried using
Code: Select all
$('#txtSearch').bind('input', function() {});
$('#txtSearch').on('input', function() {});
$('#txtSearch').keyup(function() {});
$('#txtSearch').setOnchange(function(a,b) {});
However all of these render the same result in Processmaker. Any ideas how I can get around this?
User avatar
By atbmbk
#823279
hi ; this code is working when text input field loses focus , how can change this code to work without loses focus?
Code: Select all
function rep() {
    var val=$("#AAA").getText();  
    val=val.replace(/a/g,'aa');
    val=val.replace(/b/g,'bb');
    val=val.replace(/c/g,'cc');
    $("#AAA").setText(val);
}
$("#AAA").setOnchange(rep);
thanks.
User avatar
By amosbatto
#823283
Use code like this:
Code: Select all
$('#clientCode').getControl().keypress( function() {
  var code = $("#clientCode").getControl().val();  
  code = code.replace(/a/g, 'A');
  code = code.replace(/b/g, 'B');
  code = code.replace(/c/g, 'C');
  $("#clientCode").getControl().val(code);
});
User avatar
By atbmbk
#823299
amosbatto wrote: Thu Mar 07, 2019 10:40 pm Use code like this:
Code: Select all
$('#clientCode').getControl().keypress( function() {
  var code = $("#clientCode").getControl().val();  
  code = code.replace(/a/g, 'A');
  code = code.replace(/b/g, 'B');
  code = code.replace(/c/g, 'C');
  $("#clientCode").getControl().val(code);
});
You mean the world to me; we change keypress to keyup and that's ok.
thanks amosbatto .

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]