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 6536409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:29:24+00:00 2026-05-25T10:29:24+00:00

The below way I call my pageload function by jQuery. Please tell me how

  • 0

The below way I call my pageload function by jQuery.

Please tell me how to pass query string.

<script type="text/javascript" src="script/jquery-1.3.2.min.js"></script>

<script type="text/javascript">
  $(document).ready(function() {
    $('#Customers').change(function() {
      $.ajax({
        contentType: "text/html; charset=utf-8",
        data: "CustomerID=" + $('#Customers').val(),
        url: "FetchCustomer.aspx",
        dataType: "html",
        success: function(data) {
          $("#CustomerDetails").html(data);
        }
      });
    });
  });
</script>

I have a few questions like

  1. when type: “POST”, then contentType: “application/json; charset=utf-8”,
    has to be application/json? it can not be html?

  2. when type: “POST” then url can’t be like url: “Customer.aspx?ID=101/FetchCustomer”
    I mean I can not then pass query string.

Guide me please. Thanks

  • 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-25T10:29:25+00:00Added an answer on May 25, 2026 at 10:29 am

    GET and POST has nothing to do with contentType you can set contentType:"html" with type:"POST"

    when you set the type:"POST" the form values are not visible in the query string like www.utopia.com?name=john&lastName=smith

    The HTML specifications technically define the difference between "GET" and "POST" so that
    
    
    former means that form data is to be encoded (by a browser) into a URL while the latter means that 
    
    the form data is to appear within a message body. But the specifications also give the usage 
    
    recommendation that the "GET" method should be used when the form processing is "idempotent", and in
    
     those cases only. As a simplification, we might say that "GET" is basically for just getting 
    
    (retrieving) data whereas "POST" may involve anything, like storing or updating data, or ordering a 
    
    product, or sending E-mail.
    

    REF: http://www.cs.tut.fi/~jkorpela/forms/methods.html#fund

      $(document).ready(function() {
        $('#Customers').change(function() {
          $.ajax({
            type:'POST',
            contentType: "text/html; charset=utf-8",
            data:{CustomerID:$('#Customers').val()},
            url: "FetchCustomer.aspx",
            dataType: "html",
            success: function(data) {
              $("#CustomerDetails").html(data);
            }
          });
        });
      });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Would following the table below be the best way of determining the access type
Is there a way to take text like below (if it was already in
I am looking for a way to call a function only after .each() finishes
I am looking for an elegant way to call a function based on the
i call my asp.net page method like below code $.ajax({ type: POST, url: MyPage.aspx/GetItems,
I am having trouble with my jQuery script below, this is a basic stripped
Is there a best (see below) way to append two byte arrays in C#?
Below is my way, albeit a basic way of creating a Decision Tree...The problem
Lets say I have model inheritance set up in the way defined below. class
What's a more elegant way of having the code below where i want to

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.