• 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

Laravel Factory not calling callback 'afterCreating'

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

Why does codeigniter & Linux server throws unserialize() session data error when user tries to login

Symfony redirect if already loggedin from login page

if statement inside concatenation

Transpose multidimensional array and join values with commas

PHP date() with timezone?

php - add comma thousands separator but remove trailing zeros

Shopify password update using Shopify API

CONCAT columns with Laravel 5 eloquent

How can I access an array/object?

How can I pass the list to the component variable in Laravel?

Laravel Schedule not sending email

Whats the point of running Laravel with the command 'php artisan serve'?

Debugging Stripe Webhook Event

About Contact Privacy policy Terms and conditions