• 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

What's the net::ERR_HTTP2_PROTOCOL_ERROR about?

Declaration of OMDb::query(string $statement) must be compatible with PDO::query

Is it possible to re-use an array taken from PHP via JSON in a $.ajax function?

Comma separated list from array with "and" before last element

Don't show recurring price for WooCommerce subscriptions worth 0$

How to Install Composer Require doctrine/dbal

Pass an image through AJAX [duplicate]

How to get array values using foreach in laravel

How do I loop through an MS SQL database with VB.NET?

Creating a config file in PHP

Inserting data into SQL Server Db An Invalid direction was specified

Add Class in html Dynamically in PHP

PHP Discord OAUTH2 code sample not working

Docker & Laravel : configure: error: Package requirements (oniguruma) were not met

Getting output of MS stored procedure on php call

About Contact Privacy policy Terms and conditions