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

  • Home
  • SEARCH
  • 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 9202613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:17:53+00:00 2026-06-17T23:17:53+00:00

I am attempting to submit the text input and have the page refresh with

  • 0

I am attempting to submit the text input and have the page refresh with the submitted results, using Django for server-side. I am still very new to this. Am I doing this correctly?

Python/Django:

urlpatterns = patterns('qanda.views',
     url(r'^(?P<url_id>\d+)/(?P<link_id>\d+)/add_answer/$', 'add_answer')

jQuery:

$('#submitAnswer').on('click', function(e){
    var dataString = tinyMCE.get('addAnswer').getContent(); 
    e.preventDefault();
    $.ajax({
        type: "POST",
        url: "/add_answer",
        data: dataString,
        success: function(){
            alert(dataString);
        }
    });
}); 

It would be great if you could point me in the right direction. Thanks in advance!

  • 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-17T23:17:54+00:00Added an answer on June 17, 2026 at 11:17 pm

    You need to use a javascript debugger to see the ajax responses. You’d see you’re getting a 404.

    Your url does not match your django view..

       $.ajax({
            type: "POST",
            url: "/add_answer",
                // ^^^^^^^^^^^ should be /1/1/add_answer/ 
                // (if this script is at /1/1/ remove the leading slash)
    
            data: dataString,
            success: function(){
                alert(dataString);
            }
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using railo and attempting to submit a tinymce text area via ajax.
I am attempting to submit a querystring to a ColdFusion page. I would like
I'm attempting to validate the input of a text box which corresponds to a
I'm attempting to submit a job using the XGrid API. I've opened a connection,
I am attempting to compare the input text to an xml tag for validation
I'm attempting to check the values entered by a user into an input text
I'm attempting to submit a large database containing many tables to a web service
Attempting to build a C# NPAPI plugin I have found a tutorial which describes
Attempting to get Spring internationalization working. I have used classpath:messages basename, created .properties files
Attempting to set up an automated texting service for customers, where people can text

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.