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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:28:54+00:00 2026-05-13T16:28:54+00:00

I admit I got kinda confused with Http requests and responses, so I’ll begin

  • 0

I admit I got kinda confused with Http requests and responses, so I’ll begin by presenting my problem.

I made a webpage that takes user input, processes it and uses XMLHttpRequest POST to send the processed data to another page and display said data into said page.

Now, I can form the XMLHttpRequest using POST just fine, as well as successful redirection; but what I want to actually do is have the second page display the POSTed data.

How can I let the second page read and display the data encapsulated in the POST request in a successful redirection from the first page?

Here is my XMLHttpRequest code, in javascript:

var xmlhttp= new XMLHttpRequest()

 xmlhttp.open('POST',"Default2.aspx",false);
  xmlhttp.setRequestHeader('Content-Type',
'application/x-www-form-urlencoded');
 xmlhttp.setRequestHeader("Connection", "close");

xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            window.location = "Default2.aspx";
            }
}

  xmlhttp.send(""+x);

I want to handle the POSTed data in the second page in javascript or ASP.NET.

  • 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-13T16:28:54+00:00Added an answer on May 13, 2026 at 4:28 pm

    It sounds like you shouldn’t be using AJAX / XMLHttpRequest at all. Just create a form that posts to the second page like normal, ie:

    <form action="Default2.aspx">
      <!-- put the form elements here -->
      <input type="submit" value="Submit">
    </form>
    

    XMLHttpRequest is for getting server-side data from a different page/script and doing something with that data without leaving the current page. When you want to leave the current page you just use a form, as has been the standard for 15+ years.

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

Sidebar

Related Questions

I have to admit that I got pretty rusty with django, so I'm sorry
I'm trying to set up admin with grappelli on dotcloud services. I've got that
I admit that I have almost none experience of unittesting. I did a try
OK so I admit right off the top that this is a bit screwy
I've got a serious problem with my GPS on my Nexus One: I wrote
Ive got some kind of a problem here. When I try this function, it
I finally got my django install working, however I'm noticing that the typical look
I've got a marketing team that wants social sharing buttons (Facebook, G+, SU, and
I got a little problem with datamapper, and I'd like to know if there
I've got to admit, I really don't much about HTML, but I'm attempting 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.