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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:30:29+00:00 2026-06-01T03:30:29+00:00

Hello you naughty code animals.. I have tried to get this code to work,

  • 0

Hello you naughty code animals..

I have tried to get this code to work, and also searching it up. But i find no up-to-date answer i can understand.
So i’ll give you the form, then the jQuery.

FORM:

<div id="blab_form_overcontent">
    <table border="0" align="center">
        <form id="submit_blab" method="post">
        <input type="text" name="blab_title" id="blab_title" value="" placeholder="title(optional):"/><br/>
        <textarea name="blab_text" id="blab_text" value="" placeholder="text:"></textarea>
        <input type="submit" id="blab_submitb" name="blab_submitb" value="Post"/>
        </form>
        <div class="success" style="display: none;">Blab has been added.</div>
    </table>
</div>

jQuery:

$(document).ready(function(){
  $("form#submit_blab").submit(function() {
  // I store the values from the form input box, then send via ajax below
  var blab_title   = $('#blab_title').attr('value');
  var blab_text    = $('#blab_text').attr('value');
    $.ajax({
        type: "POST",
        url: "classes/profileActions.php",
        data: "blab_title="+ blab_title +"&amp; blab_text="+ blab_text,
        success: function(){
            $('form#submit_blab').hide(function(){$('div.success').fadeIn();});

        }
    });
    return false;
  });
});

NOTE: i know its not my profileActions.php that is the problem because the code over dont get as far as posting anything. It reloads the page only.

Regards,
-Clueless idiot.

  • 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-01T03:30:30+00:00Added an answer on June 1, 2026 at 3:30 am

    It’s refreshing the page because you aren’t telling it to NOT refresh the page. 🙂

    $('#submit_blab').submit(function(e){
      //start with preventing the default submit action...
      e.preventDefault();
    
      var blab_t   = $('#blab_title').val();
      var blab_txt    = $('#blab_text').val();
    
      var json = { blab_title: blab_t, blab_text: blab_txt }      
    
      $.ajax({
        type: "POST",
        url: "classes/profileActions.php",
        data: json,
        success: function(){
            $('form#submit_blab').hide(function(){$('div.success').fadeIn();});
        }
      });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello i have this code var queue = new BlockingCollection<int>(); queue.Add(0); var producers =
Hello I have the following code namespace ConsoleApplication2 { class Program { static void
Hello! I'm not even sure if this is possible, but hopefully it is in
Hello I have this problem with PyQt4-dev-tools that include: * a user interface compiler
Hello I am compiling a program with make but I get the error of
hello i wanted to build I get $date and $date1 from form xxx. I
Hello i been trying to get a tokenizer to work using the boost library
Hello I have this query... if (isset($_REQUEST['deletePost'])) { $q = $dbc -> prepare(DELETE FROM
Hello I am trying to install Hubot on a Ubuntu machine but can't get
Hello I have a table on which I have denied SELECT privs to a

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.