$(document).ready(function(){ $('#OLF').html('

Order Lookup

If you need to quickly find out the status of your order, you can enter the order number and the billing email address that was used to place your order. If you have any other questions or need additional information, you can also Contact Us

');$('body').on('click','#order-lookup-form button.btn',function(){ if ($('#stickersOrderLookupOrderEmail').val()!=='' && $('#stickersOrderLookupOrderNumber').val()!==''){ process($(this)); } else { if ($('#stickersOrderLookupOrderEmail').val()==''){ alert('Please enter the billing email address you used for this order'); } else if ($('#stickersOrderLookupOrderNumber').val()==''){ alert('Please the the order number you are looking for'); } } function process($this){ var $o = $this.html(); var id = $('#stickersOrderLookupOrderNumber').val().trim(); var email = $('#stickersOrderLookupOrderEmail').val().trim(); if(id=='' || email==''){ alert('Please include your Order/Quote # and Email Address'); return; } var $items = id+'[x]'+email; $('#stickersOrderLookupOrderNumber').val(id); $('#stickersOrderLookupOrderEmail').val(email); $('#order-status-container').html(''); $this.html('Processing...').attr('disabled','disabled'); $('#order-lookup-form input').attr('disabled','disabled'); $('#order-status-container').html(''); $.ajax({ url: "library/API/connect.js", data:{ A:'OLR', V:$items }, type:"POST" }).done(function( html ) { $('#order-status-container').html(html); }).always(function(){ $('#order-lookup-form input').removeAttr('disabled'); $this.html($o).removeAttr('disabled'); }); } }); });