• 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

Get sum of arrays inside array

Laravel 5.1 Unknown database type enum requested

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

storagelogs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied

Laravel phpunit test failing authorization

Laravel UUID generation

(PHPUnit) PHP Fatal error: Uncaught Error: Call to undefined function each()

How to fix " Uncaught TypeError: Argument 1 passed to JpGraphException::defaultHandler() " problem in php 7.1.3 and jpgraph 4.2.6?

XSS attack still works despite htmlspecialchars() doing its work

JQuery content editable div and text box on submit not sending POST

how to hide previous markers when new markers added in google map javascript api

How to set dynamic `home` and `siteurl` in WordPress?

Match csv filenames to table names and import

Laravel 5.2: Unable to locate factory with name [default]

Can't call javascript alert alertify library from PHP

About Contact Privacy policy Terms and conditions