Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

check textbox is empty in jquery

if ( $("#txt").val().length == 0 )
{
  // do something
}
Comment

jquery check if input is empty

if ($.trim($("user_name_intend").val()).length != 0 &&
            $.trim($("user_telephone_intend").val()).length != 0 &&
            $.trim($("user_email_intend").val()).length != 0 &&
            $.trim($("user_comment_intend").val()).length != 0) {
            $.ajax({
                url: "/makeOrder",
                type: "POST",
                data: {
                    quantity: 1,
                    min_quantity: 1,
                    max_quantity: 100,
                    name: $('#user_name_intend').val(),
                    telephone: $('#user_telephone_intend').val(),
                    email: $('#user_email_intend').val(),
                    comment: $('#user_comment_intend').val(),
                    product_id: {{ product_id }},
                },
                dataType: "json",
                success: function (t) {
                    $("#intendformpost").submit();
                },
            });
        } else {
            alert("Kerakli maydonlar to'ldirilmagan")
        }
Comment

PREVIOUS NEXT
Code Example
Javascript :: get current domain javascript 
Javascript :: Scrool to the bottom of a div 
Javascript :: How To Hide Back Button In React/React Native Navigation 
Javascript :: package.json: License should be a valid SPDX license expression 
Javascript :: javascript group by property array of objects 
Javascript :: javascript shuffle an array 
Javascript :: vue truncate text 
Javascript :: useeffect will unmount 
Javascript :: how to view sync storage in chrome 
Javascript :: how to get date time day year in javscript 
Javascript :: dont drag img 
Javascript :: javascript hex to binary 
Javascript :: get the domain name in javascript 
Javascript :: jquery loop through json 
Javascript :: console.dir depth 
Javascript :: how to make javascript progarm that randomly displayes a word 
Javascript :: check if a string contains another string js 
Javascript :: vh not working on phone 
Javascript :: jquery checked 
Javascript :: select onchange pass option value in angular 6 
Javascript :: js loop array 
Javascript :: change placeholder text jquery 
Javascript :: get scroll position jquery 
Javascript :: js rounding 
Javascript :: array to comma separated list js 
Javascript :: javascript hasownproperty 
Javascript :: npm could not determine node.js install directory 
Javascript :: format JSON code javascript 
Javascript :: javascript random letter generator 
Javascript :: javascript read json file 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =