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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:39:56+00:00 2026-06-12T01:39:56+00:00

Im new to the ajax jquery i read about it and mess around with

  • 0

Im new to the ajax jquery i read about it and mess around with the codes but im still not understanding on some stuff , Im trying to creating a message form, i want my script in php processes the message and when theirs a error, i want the error to show on the same page of the form and i also dont want the page to refresh when click submit.

here what i got , i know its not a lot im still trying to understand on how to work with ajax jquery

<script>
$.post("message/sendm.php", {message:"#message" } );

</script>
  <div id="send"  style="color:#000" class="reveal-modal">

       <form name="message" method="post" style="background:#999">
<table>
<tr><td>To:<?php echo $user ?></td></tr>  
<tr><td>Message:<textarea style="resize:none"  id="message"name="text" rows="10" cols="60"></textarea></td></tr>  
<tr><td><input name="message" type="submit" value="Send!"></td></tr>  
</form> 
     </table>  

i know its not a lot im still trying to understand on how to work with ajax jquery and if anyone knows a good book to learn ajax jquery please let me know. I already try the jquery website its not really useful it doesnt explain everything, like it doesnt explain on how to send $_Post to the php page to process any errors and how to show them on the same page

  • 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-12T01:39:57+00:00Added an answer on June 12, 2026 at 1:39 am

    You can use jQuery to make ajax calls to a server. A method I like to use is:

    $("#form").submit(function (event) {
        event.preventDefault(); //this stops the default form action
        $.ajax({
            type: 'POST', //this is how you specify post or get
            url: 'myform.php', //this is where your server file for processing the form goes
            data: $('#form').serialize(); //serialize all the data from the form
            success: function (data) {
                     $('#alerts').html(data)//fills the element with the id of alerts with whatever is returned from the php page.
            }
        });
    });
    

    Then you just have to create a page on your server for processing the information (in my example it would be myform.php. Anything you output from the php page (i.e. using echo) will show up in the element with the id alerts.

    Hope this was helpful.

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

Sidebar

Related Questions

Hello I have read about jQuery ajax method, jQuery wraps some XMLHttpRequest inside. I
I am familier with jQuery,Ajax and JSP Servlets but new to Struts2.I want to
Hey all I'm extremely new to jquery and ajax and I'm looking for some
Disclaimer: I'm fairly new to AJAX! I've looked around, and I'm not sure which
I'm currently new into client-side programming, especially using the Jquery Ajax method to call
I am writing an ajax script in jQuery. The script gets new or previous
I have application that brings response via Ajax and creates 5-20 new jQuery click
I have read several articles/questions/forums discussing the best auto-complete plugin for jQuery. After trying
[I did see the similar problems solved with AJAX/jQuery, so please read on]. I
I'm new to Javascript. The code for a jQuery-ajax-php-cooperation does strange things. It works

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.