• 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 can i hide dt if dd got empty value

How to modify CSS in a specific page of the WP admin dashboard (backend)

How to get total pages of PDF with FPDF?

array_map triple dimensional array [duplicate]

laravel MVC execution flow

How to make dot match newline characters using regular expressions

html-php form submission after validation through JavaScript [closed]

PHP how to detect if running on arm64 cpu?

Insert multidimensional array to codeigniter cart

Unable to guess the mime type as no guessers are available Laravel 5.2

How do I Post to .txt document before form submits

PHP's array_map including keys

php: command not found Command PhaseScriptExecution failed with a nonzero exit code

500 Internal Server Error on Ajax request. Not sure the origin of the problem

Exact alternate to mcrypt_encrypt in PHP 7.2

About Contact Privacy policy Terms and conditions