• 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

PHP: Print caught exception like Xdebug

How avoid Moved Permanently The document has moved here

passwordless LDAP login and get user information using Kerberos ticket in PHP

Laravel Blade checkbox not checked

Can't find vendor/autoload.php for Ratchet

Laravel Gates using model and returns "Using $this when not in object context" Line 28 of AzureUser model

Log file is not being written in Laravel 5.5

Appending data to an anchor tag

Laravel database insert with combining array and string

Reading input in php from terminal

Convert string to lowercase AND then convert it to its original form in PHP, is it possible?

GuzzleHttp Hangs When Using Localhost

GuzzleHttp Hangs When Using Localhost

How to use React Router with Laravel?

Detect a fetch request in PHP

About Contact Privacy policy Terms and conditions