How to find selected and unselected item in select2 dropdown
While using select2 library, if you have to find the selected and unselected item based on the change event when you check or uncheck the items. Based on the checked…
While using select2 library, if you have to find the selected and unselected item based on the change event when you check or uncheck the items. Based on the checked…
<html> <head> <script src=”https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js”></script> <script type=”text/javascript” src=”https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.full.min.js”></script> <link rel=”stylesheet” type=”text/css” href=”https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.css”> </head> <body> <script> jQuery(document).ready(function(){ var allowedDate = ; jQuery(‘#date-needed’).datetimepicker({ format: ‘Y-m-d’, timepicker:false, // maxDate: ”, onShow:function( ct ){ this.setOptions({…
How to reorder table rows using drag and drop and automatically save the sequence in database. Sample Table code start <table class=”table table-bordered” id=”tbl_1″> <thead> <tr> <th width=”25%”>Column1 Label</th> <th…
When you have to prefix any hard coded value in a text field, like for example in telephone field you have to prefix the country code and dont want the…
<script type=”text/javascript”> var formChanged = false; jQuery(window).load(function() { // This is triggered when the entiire page is loaded fully // form id and all the possible filed type in that…
I want to trigger an event every time i click on select on any element by id First i will try to set the input value by the following code…
function makeAjaxRequest(data1,data2,.....,datax){ $.ajax({ 'type':'POST', async: false, url: 'http://www.example.com/some_request_url', data:{param1:data1,param2:data2,....,paramx:datax}, success : function(response) { console.log(response); // Using this you can check the posted data in browser console window return true;// you…
Usually when we try to submit the form after ajax call on success response, the form does not’t get submitted. Like for example in below code:- $.ajax({ type : “POST”,…
function validateEmail(email) { var emailReg = /^(+@(+\.)+{2,6})?$/; return emailReg.test(email); } Usage:- if(validateEmail(emailString)){ alert('Your email is valid'); } else{ alert('Your email is not valid! There should be atleast @ and one…
First add the custom method to the validation library as below. Can you put this code in your jquery validation file or in your page where you want to validate…