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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:10:51+00:00 2026-05-28T04:10:51+00:00

Ive been working on some jquery within a a page. Now all of a

  • 0

Ive been working on some jquery within a a page.
Now all of a sudden the post functions seem to have stopped working?

 function deleteRow(OrderNo, LineNo) {
    alert(OrderNo + ";" + LineNo);
    $.ajax({
        type: "POST",
        url: "Ajax.aspx/DeleteRow",
        data: '{' + 'OrderNo:"' + OrderNo + '",' + 'LineNo:"' + LineNo + '"' +
                   '}',
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function (msg) {
            //$("#item").val(msg);
            var data = jQuery.parseJSON(msg);
            if (!data.error) {
                $('#' + LineNo).remove();
            }
            else {
                alert("Error" + " " + data.error);
            }
        },
        error: function (msg) {
            alert('Failure: ' + msg);
        }
    });
}

This is a jquery function which gives an error back ‘Failure [object Object]’

the function DeleteRow does exist in Ajax.aspx and does work. Cant understand why all of a sudden the post functions would stop working??

[WebMethod]
public static string DeleteRow(string OrderNo, string LineNo)
{
    SqlConnection myConnection = new SqlConnection(connStr);
    myConnection.Open();
    //Check if param exisits
   string SQLst = "Delete from Saved_Order_Import where [Order No] = '"+OrderNo+"' And [Line No] = '"+LineNo+"'";
   try
   {
       SqlCommand myComman = new SqlCommand(SQLst, myConnection);
       myComman.ExecuteNonQuery();
   }
   catch (Exception ex)
   {
       myConnection.Close();
       return "{\"error\":\"Error Line Not Deleted" + ex.ToString() + "\"}";
   }
   myConnection.Close();
   return "{\"Success\":\"Line Deleted\"}";
}

console log

abort: function ( statusText ) {
always: function () {
complete: function () {
done: function () {
error: function () {
fail: function () {
getAllResponseHeaders: function () {
getResponseHeader: function ( key ) {
isRejected: function () {
isResolved: function () {
overrideMimeType: function ( type ) {
pipe: function ( fnDone, fnFail ) {
promise: function ( obj ) {
readyState: 4
responseText:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1"><title>

</title></head>
<body>
    <form name="form1" method="post" action="Ajax.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2MTY2ODcyMjlkZAZAz479BJ9BS5KpwM0PauBgztmI" />
</div>

    <div>
    </div>
    </form>
</body>
</html>
"
setRequestHeader: function ( name, value ) {
status: 200
statusCode: function ( map ) {
statusText: "parsererror"
success: function () {
then: function ( doneCallbacks, failCallbacks ) {
__proto__: Object
  • 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-28T04:10:52+00:00Added an answer on May 28, 2026 at 4:10 am

    Based on the response you posted, the server output was a HTTP Status 200 with a HTML Form as the response. Was this the desired format of the response?

    You’re telling the AJAX function to parse the response as JSON but no JSON came back from the request. Look at your console log. The exception is a parser error.

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

Sidebar

Related Questions

I have been working on some jQuery code for an interactive map. I've already
I've been working with JQuery for some time now and I've always used the
Recently I've been working on some embedded devices, where we have some structs and
I've been working on a foundational c++ library for some time now, and there
I've been working for some time with jQuery Tools, mostly Tabs. And for the
i have been working on a new .net MVC site and have integrated some
I've been working on some jQuery widget for work/fun lately ( github ) and
I've been working with ASP.NET MVC and Javascript/jQuery a lot lately and I seem
Need some help. Ive been using tooltips on my site and everything is working
I've been working with some ExternalDataExchange - based communication in WF recently. My understanding

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.