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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:01:44+00:00 2026-05-27T15:01:44+00:00

I am getting an error back on a jQuery ajax post. The error I

  • 0

I am getting an error back on a jQuery ajax post.

The error I receive in IE is SyntaxError: Invalid character.

The entire project can be found at: http://dragsort.codeplex.com/

When you move one of the boxes to another location (click and drag) the ajax post occurs.

In order to display the error I had to add the error ajax property to the jQuery ajax call.

function saveOrder() {
var data = $("#gallery li").map(function() { return $(this).attr("itemID"); }).get();
$.ajax({ 
    url: "example.aspx/SaveListOrder", 
    data: '{ids:["' + data.join('","') + '"]}', 
    dataType: "json", 
    type: "POST", 
    contentType: "application/json; charset=utf-8",
    error: function(data, status, jqXHR) { alert(jqXHR); }
});
};

Code behind Method

[WebMethod]
public static void SaveListOrder(int[] ids)
{
    for (int i = 0; i < ids.Length; i++)
    {
        int id = ids[i];
        int ordinal = i;
        //...
    }
}

Any ideas on what the issue is? Thanks in advance.

EDIT/ANSWER:

The problem is in the web.config. I added the following httpModule in the web.config

<configuration>
  <system.web>    
    <httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </httpModules>
  </system.web>
</configuration>

If anyone would like to elaborate on why this is needed that would be great. I’ll create a post as the answer once i’m allowed to do so.

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-27T15:01:45+00:00Added an answer on May 27, 2026 at 3:01 pm

    The problem is in the web.config. I added the following httpModule in the web.config

    <configuration>
      <system.web>    
        <httpModules>
          <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </httpModules>
      </system.web>
    </configuration>
    

    If anyone would like to elaborate on why this is needed that would be great. I’ll create a post as the answer once i’m allowed to do so.

    Thanks!

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

Sidebar

Related Questions

I am getting the following error when I post back a page from the
I'm having trouble getting a response back from a Jquery ajax call... (It's a
When I post my ajax data to my webservice I keep getting this error.
I am getting a NaN error in my ajax callback function and can only
I started getting this error when posting the form back with Model Binder. To
We are getting an error in a VB6 application that sends data back and
hi im new to c# and was trying to code but getting error can
Getting a weird error on a site I am developing. Even looked back at
I am getting a response from ajax request(done by jquery). I have a method
I am getting 500 Internal Server Error back from the Azure REST management API

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.