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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:57:53+00:00 2026-05-28T00:57:53+00:00

I dont get it… I reviewed my code hundred times and I dont get

  • 0

I dont get it… I reviewed my code hundred times and I dont get the error…

I am actually testing a bit with JQuery and AJAX and made a simple form with a textarea to submit. Without AJAX it works fine, but with, it sends always an empty value of my textarea…

The Javascript Code:

 $(document).ready(function(e) {
        $("#formPost input").attr("disabled", false);

        $("#formPost input:submit").click(function() {
            $.ajax({
                type: 'POST',
                url: 'post.php',
                dataType: 'json',
                data: $('#formPost').serialize(),
                beforeSend: function(XMLHttpRequest) {
                    $("#formPost input").attr("disabled", true);
                    $("#formPost .ajaxloader").show();
                },
                success: function(data) {
                    var message = $("#flashMessage");

                    message.text(data.msg);
                    if(data.error) {
                        message.addClass("fail");
                    }
                    else {
                        message.addClass("success");
                    }
                    message.show();
                },
                error : function(XMLHttpRequest, textStatus, errorThrown) {
                    $('#formPost .ajaxloader').hide();
                    $('#flashMessage').removeClass().
                        addClass('fail').text('There was an error.').show();
                },
                complete: function(XMLHttpRequest) {
                    $("#formPost input").attr("disabled", false);
                    $("#formPost .ajaxloader").hide();
                }
            });
            return false;
        });
    });

The HTML:

<div>
      <h1>Add new post</h1>
      <div id="flashMessage"></div>
      <form id="formPost" method="post" action="post.php">
        <textarea id="post" name="post"></textarea>
        <input type="submit" value="Save" />
        <div class="ajaxloader">
          <img src="ajax-loader.gif" />
        </div>
        <div class="clear"></div>
      </form>
    </div>

I use Firebug and look under “Network” -> “XHR” -> “Post” and under Source he shows post=

So where is the value gone?

  • 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-28T00:57:54+00:00Added an answer on May 28, 2026 at 12:57 am

    Your problem is related with CKEditor (as you said in the comment), because WYSIWYG editors replace the appearance of textarea and update value on form submit. So you have to use built-in functions of CKEditor for updating textarea‘s value manually as you are using Ajax. I can’t help you specifically with CKEditor but this thread may help: CKEditor, AJAX Save .

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

Sidebar

Related Questions

I dont get this error, there is a row in database. $tip = StringHelper::trimmer($_GET['tip']);
I get this error, and I dont get how to fix it? class 'SoundTap_HDViewController'
I dont get the error when I use the following line FileItemIterator it =
I dont get the get variables but when i put the code in production
I dont get an error but it does not return me the row values
I dont get why when i compile this code i get the incorrect zip
I dont get it. I wrote the code to have the footer always at
I dont get the point, why I have to code so much for it.
i wrote the code but i dont get max value how to find max
below is my html form and i dont get any error if i dont

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.