• 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

How do I enable error reporting in Laravel?

Best way to scrolldown onpageload

CodeIgniter 4: Like and Dislike Functionality

How to get median and quartiles/percentiles of an array in JavaScript (or PHP)?

Android Volley getParams() method not getting called for JsonObjectRequest

Laravel PHP: multiple project run at the same time [closed]

how to make my own auto increment in php?

How to fix bootstrap multiselect search data using ajax

Google API Heatmap Layer exception, why?

Only on Firefox "Loading failed for the <script> with source"

enable Apache http Authorization header

Convert date and time to Jalali in Laravel

Execute only one time and then wait set period of time before executing again

phpunit - testing is painfully slow

Form repeater send wrong data with last element in Laravel

About Contact Privacy policy Terms and conditions