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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:56:37+00:00 2026-06-06T19:56:37+00:00

I have one web application which I have been working for some time.I am

  • 0

I have one web application which I have been working for some time.I am sending data using HTTP POST request using AJAX technique.

I am using JavaScript like this:

var rdate=document.getElementById('rdate').value;
var Description=document.getElementById('description').value; 
var urlstring="rdate="+rdate+"&Description="+Description;

oxhr.open("POST","http://localhost/info/php/store.php",false); 
//checking for ready state change here

oxhr.send(urlstring);

But in database I see everything blank (no data but a row created)
Shouldn’t the urlstring contain variables? or what could be the possible mistake in JavaScript.

Any help is greatly appreciated.

  • 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-06-06T19:56:40+00:00Added an answer on June 6, 2026 at 7:56 pm

    Solution (to find the problem, because people aren’t physic): use a tool like Firebug / Fiddler2 / IE Developer Tools, or other, to see what is really sent, or if a request is even made.

    While I won’t claim the following is an answer, the above manual string building in the post is … painful and not very robust. Here is a little useful function:

    function encodeParams(params) {      
        var components = []
        for (var k in params) {
            if (params.hasOwnProperty(k)) {
                var v = params[k]
                components.push(encodeURIComponent(k) + "=" + encodeURIComponent(v))
            }
        }
        return components.join("&")
    }
    

    Use as:

    var queryString = encodeParams({
        admin_id: 1,
        rdate: rdate,
        Description: description
    })
    

    This also correctly encodes the components so the query string does not become corruptued.

    Happy coding.

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

Sidebar

Related Questions

I'm working on a Python web application in which I have some small modules
I have a one page web application, which means alot of javascript. External scripts
I have web application Project having RPC call. one RPC async is working fine.
I have web application written in java using Eclipse. It has just one servlet
I have built a web application using Java EE platform that sells one of
We have a web application which has been developed over the past 7 months.
I'm working on an Asp.Net 4.0 web application which is using the Membership and
I've been a web developer for some time now, and have recently started learning
So I have an ASP.NET/VB web application in which I'm using both RequiredFieldValidators and
Do you have one solution with the web application project, class libraries, database project

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.