Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery load data when entered (as opposed to clicking)
    text
    copied!<p>On one section of my website, I ask my customers for their postal code and country. Shipping rates are loaded from another page once they enter these information and click on calculate link. Now, I want to remove the click button and once these information entered, I want users see loading image and load data immediately. I was wondering if that is possble and if there are any examples.</p> <pre><code>$(document).ready(function() { $("#link").click(function() { $.ajax({ type: "GET", data: { PROCESS: "UPS", WEIGHT: "&lt;%=Session("TotalWeight")%&gt;", POSTALCODE: $(document.getElementsByName("ShippingPostalCode")).val(), COUNTRY: $(document.getElementsByName("ShippingCountry")).val() }, url: "content/checkout/step1/index.cs.asp", success: function(output) { $("#sonuc").html(output); $("#sonuc").css("display", "block"); } }); }); }); </code></pre> <p>Quick update! I allowed my customers to store addresses for future use. If they have an address stored, they can copy and paste the address with one click. Here is the code for that:</p> <pre><code>function StoredData(){ $.get("includes/ajaxfunctions.asp?Process=checkout1", { QUERY: $(document.getElementsByName("CUSTOMERDETAILNAME")).val() }, function(data){ $("div.StoredData").html(data); }); } </code></pre> <hr> <pre><code>$(document).ready(function() { $("input[name=ShippingPostalCode]").livequery("change", function() { $.ajax({ type: "GET", data: { PROCESS: "UPS", WEIGHT: "&lt;%=Session("TotalWeight")%&gt;", POSTALCODE: $(document.getElementsByName("ShippingPostalCode")).val(), COUNTRY: $(document.getElementsByName("ShippingCountry")).val() }, url: "content/checkout/step1/index.cs.asp", success: function(output) { $("#sonuc").html(output); } }); }); }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload