• 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 show selected value using javascript in laravel

javascriptphphtmllaravelselect-options


PHP Snippet 1:

let select  = $('#editkelompok_id');
select.on('change',()=>{
    // Your stuff
  })

PHP Snippet 2:

let options  = $('#editkelompok_id').children();

    options.each(function() {
        let option = $(this);
        option.on('change', () => {
            select.val(option.val());
        })
    })

Related Snippets

Get orders by date and status woocommerce

Use same method for inertia response and json response Laravel Jetstream

how to display a view on laravel 8 and not have a 404 NOT FOUND page?

Laravel Route issues with Route order in web.php

Not able to override collapsible.js in magento 2

Target Individual Form Instance/Counter Inside A PHP While Loop

Dynamic dropdown Ajax PHP request

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

Laravel s3 upload file with metadata using pre-signed url

Reducing authentication calls on external API (Laravel 5.6)

I want a way to give path to my files which are outside of public folder in laravel

Shortcode or PHP inside a shortcode in Wordpress

Creating live search with AJAX and CodeIgniter

Need to display only array value in JSON output

Getting error: CodeIgniterDatabaseBaseResult::getResult in CodeIgniter

About Contact Privacy policy Terms and conditions