• 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

Failed user login on production server using Symfony framework (Authentication request could not be processed due to...)

Results page in other window

How can I stop a symfony process which is listening on http://127.0.0.1:8000

Custom post type single page not working

browsersync doesn't work with XAMPP

Mysqli multi query error

Add restriction to WooCommerce coupons by allowed user ID

Reload parent page after submit in iframe

Stop caching for PHP 5.5.3 in MAMP

How to send upload image through email

Laravel with App Engine Standard Class 'FacadeIgnitionIgnitionServiceProvider' not found

CodeIgniter 3 is generating a session file on each request, why?

Send same name multiple checkbox values via ajax

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

How to Generate PDF invoice to XML format using mPDF

About Contact Privacy policy Terms and conditions