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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:49:50+00:00 2026-06-19T02:49:50+00:00

I checked the server side, using directly browser GET or jquery.ajax GET to call

  • 0

I checked the server side, using directly browser GET or jquery.ajax GET to call and it could all return the correct page. That is to say, there is nothing wrong with the server side.

But when I try to use the following codes to do ajax call, I always get a 500 internal server error. The strange thing is I checked the console log and it seems that the parameters are not successfully transferred to the server. The ‘type’ and ‘source’ parameters when get to the server are all null.

The relevant codes are as below. The newXMLHttpRequest() is just a method to return correct object for different browser, which has been validated to be correct.

Anyone has any ideas about what goes wrong?

function updatePage(html){
    var change =html;
    var contents = document.getElementById("contents");
        contents.innerHTML = change;
}

function submit(){
    var t = document.getElementById("type").value;
    var source = document.getElementById("src").value;

    var req = newXMLHttpRequest();
    req.onreadystatechange = getReadyStateHandler(req, updatePage);
    req.open("GET", "RSSFetchServlet.do",true);
    req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    req.send("type="+t+"&source="+source);
}
  • 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-19T02:49:51+00:00Added an answer on June 19, 2026 at 2:49 am

    The actual problem is only when you are using POST can you use request.send method to send parameters. Otherwise, the req won’t encapsule the data into the URL.

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

Sidebar

Related Questions

I'm stuck trying to get an API call to Google Places working. I'm using
Hi i am trying to run a js function on server side using node.js
Have: Using ASP.NET MVC 2, DataAnnotationsModel based server validation, and client validation with jQuery.
I'm trying to display a HTML block, using jQuery if a checkbox is checked.
Possible Duplicate: Calling a server side function using a javascript I'm trying to use
I using Jquery autocomplete and I have the following code: Client side: $( #tags
I have an HTML document that is generated on the server side using JSP.
I am using visual studio 2005 c#, and doing server side coding. I have
I am using node.js and express, and I am calling server-side functions and syncing
I am making an jQuery Mobile and PhonGap app. It connects to the server-side

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.