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 HeshanKaru1994
#824799
Im copy and pasting a sentence with 350 characters but it has lot of spaces in between so the final character count exceeds 1000, can I trim the sentence while copy pasting to grid using javascript(maybe on change)
User avatar
By amosbatto
#824823
Use javascript like this in your textarea field:
Code: Select all
$("#myTextAreaID").setOnchange(newVal, oldVal) {
    var spaceStripped = newVal.replace(/ {2,}/g, ' ');
    $("#myTextAreaID").setValue(spaceStripped);
});
If you want to strip out hard returns and tabs as well, then use this code:
Code: Select all
$("#myTextAreaID").setOnchange(newVal, oldVal) {
    var spaceStripped = newVal.replace(/\s+/g, ' ');
    $("#myTextAreaID").setValue(spaceStripped);
});

Web3 development encompasses creating decentralize[…]

The Upland Clone Script, offered by Dappsfirm, rep[…]

Dappsfirm offers a bet365 clone script that mirror[…]

🚀 Tauchen Sie mit Immediate Alora AI in die Welt d[…]