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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:05:24+00:00 2026-05-26T00:05:24+00:00

I am trying to get ajax to work, but I keep getting a 403

  • 0

I am trying to get ajax to work, but I keep getting a 403 error. I am quite new to jquery.

The following is my code

    $('#prod_search_button').click(function(){
    if ($('#inv_prod_list').length) {
        //insert a new record
    }
    else
    {
        //create the #inv_prod_list table and insert first record
        var inv_table= '<table id="inv_prod_list" style="border: 2px solid #dddddd;"></table>';

        // create query object
        var prod_query = {
            query: jQuery.trim($('#id_prod_query').val())
        };

        // convert object to JSON data
        var jsonQuery = JSON.stringify(prod_query);

        $.ajax({
            type: 'POST',
            url: '/company/product/item_search.json/',
            data: jsonQuery,

             success: function(jsonData){
                    var parsed = JSON.parse(jsonData);
                    $('#inv_prod_wrap').html(inv_table);

                    var new_record = 'this is html for new row'

                    $('#inv_prod_list tr:last').after(new_record);



                    //off rows alt color
                   }
        });
    }
});
  • 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-26T00:05:25+00:00Added an answer on May 26, 2026 at 12:05 am

    I think you don’t pass CSRF token.

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

Sidebar

Related Questions

Trying to get this code to work but the error I am getting in
I'm trying to make creating new instances with Tastypie work, but I keep getting
Trying to get the code below to work but the success doesn't execute -
I'm trying to get the jQuery UI autocomplete widget to work but I'm having
I'm trying to get the following code to display only on specific pages but
I'm trying to get an jquery ajax callback function to update the background colour
I am trying to get jquery's .ajax() to send values sent to a form
I'm trying to get this sample for AJAX to WCF working, with the following
I am trying to get a piece of data back using jQuery ajax via
I am trying following, 1. Get response using Ajax from the users selection which

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.