Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 276403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:54:57+00:00 2026-05-12T00:54:57+00:00

On one section of my website, I ask my customers for their postal code

  • 0

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.

$(document).ready(function() { 
$("#link").click(function() { 
        $.ajax({
            type: "GET",
            data: { PROCESS: "UPS", WEIGHT: "<%=Session("TotalWeight")%>", 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");
            }
        }); 
    }); 
});

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:

function StoredData(){
    $.get("includes/ajaxfunctions.asp?Process=checkout1", { QUERY: $(document.getElementsByName("CUSTOMERDETAILNAME")).val() }, function(data){
        $("div.StoredData").html(data);
    });
}

$(document).ready(function() { 
    $("input[name=ShippingPostalCode]").livequery("change", function() { 
        $.ajax({
            type: "GET",
            data: { PROCESS: "UPS", WEIGHT: "<%=Session("TotalWeight")%>", POSTALCODE: $(document.getElementsByName("ShippingPostalCode")).val(), COUNTRY: $(document.getElementsByName("ShippingCountry")).val() },
            url: "content/checkout/step1/index.cs.asp", 
            success: function(output) { 
                $("#sonuc").html(output);
            }
        }); 
    }); 
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T00:54:58+00:00Added an answer on May 12, 2026 at 12:54 am

    I assume that your StoredData div contains these inputs.

    By writing $("div.StoredData").html(data), you are replacing the inputs that have the event handlers registered on them with new input elements that don’t. You need to reregister your event handlers every time you do that.

    The simplest way to do that is to use jQuery’s LiveQuery plugin, like this:

    $("input[name=ShippingPostalCode]").livequery("change", /*your function*/);
    

    Run this once on load, and everything should work fine.

    Alternatively, you could reregister your handlers after the AJAX callback, after running $("div.StoredData").html(data).

    Finally, you could also change you AJAX request (ajaxfunctions.asp?Process=checkout1) to return the data as JSON instead of the HTML containing the data, and update the values of the existing elements yourself. This is the fastest solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently working on a one-page layout for a website. Each section of
I am doing a small website project. In a page their is a section
Our website has one section which often changes to match the user. (examples are
I have 2 sections within a table view and I have loaded one section
I am a photographer and I recently revamped my website to a one page
MVC website- On the home page header section, I have a drop down with
I would like to redevelop a large FAQs page in one of our website.
I am making a new section on a website where existing customers ( Customer
I'm slowly moving my rails website from a traditional rails round-trip-for-each-view application to one
On my one page website at http://s361608839.websitehome.co.uk/pt-build/templatebuild/ if you click on a top menu

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.