• 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

Navigation idle on content download

Passing PHP JSON to Javascript: echo json_encode vs echo json declaration

Alert message after submitting form in PHP

backup files to google drive using PHP

Prevent blank space in pdf pages (DomPdf)

AJAX call fails with SyntaxError: Unexpected end of JSON input

Remove "estimated for {country}" text after tax amount in Woocommerce checkout page

How to convert a carbon into string, to take the date only?

Display specific shipping method if woocommerce product has specific acf field value

How to find phpcs current default standard

PHP mail function is sending blank message body

Laravel 5 controller sending JSON integer as string

onKeyUp event calculation not working on the following rows from php generated forms except the first one

What's the net::ERR_HTTP2_PROTOCOL_ERROR about?

LARAVEL: How to fetch id dynamically in a query builder?

About Contact Privacy policy Terms and conditions