• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

how to insert data into select2 search input after scan using qrcode

javascriptphpcodeigniterjquery-select2


PHP Snippet 1:

$('#add_order').select2();

PHP Snippet 2:

$(function(){
  //Your script
  console.log($('#add_order').lenght);//should display 1!
  $('#add_order').select2();
   :
   :
});

PHP Snippet 3:

$('#add_order').val("yourvalue").trigger("change");

Related Snippets

Pass a select with mysqli_fetch_row to a table

Check if a string contain multiple specific words

mysql slow on updates for a well optimized query

Laravel Unresolvable dependency resolving [Parameter #0 [ <required> $method ]] in class GuzzleHttpPsr7Request

Invalid value in field "itemtype" in Google Search Console

Cross-Origin Resource Sharing (CORS) witth Laravel and Vuejs

php echo xml documents with header

Remove "estimated for {country}" text after tax amount in Woocommerce checkout page

How to unlink image from folder?

could not find driver Debian SQL Server PHP

PHP sort array of objects by two properties

How can i call a function that executes an fpdf based on the choice of a form selector?

Popup Window and PHP form

How to get total pages of PDF with FPDF?

Magento Installation SQLSTATE[HY000] [2002] No such file or directory error

About Contact Privacy policy Terms and conditions