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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:39:59+00:00 2026-05-29T04:39:59+00:00

I am using the following code. Which is submitting fine with php and it

  • 0

I am using the following code. Which is submitting fine with php and it appears success ajax action…after of implement AJAX and submitted an email… but in the email doesn’t show the email data, it’s blank….

HTML

<form id="sForm" action="submit.php" method="get">
<label>your e-mail: </label>
<input type="text" name="email"></input>
<input id="sub" type="submit" />

</form>
<div id="message_ajax"></div>
<div id="error"></div>

jQuery

$("#sub").click(function(){


var datastr = 'email'

$.ajax({
    type: 'GET',
    url: 'submit.php',
    data: datastr,
    beforeSend:function(){
            $('#message_ajax_wait').append('Loading...');
    },
    success:function(data){
            $('#message_ajax_wait').fadeOut(400);
            $("#message_ajax_done").append('done!');
    },
    error:function(){
            $('#error').append('sigh... lets fix... or its server fault');
    }
});

return false;

});

Look i removed “return false;” it can show the email data in e-mail inbox, BUT AJAX response didn’t work and redirected to ugly php page as submit.php which is coded to send email.

Can anyone help me?

  • 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-29T04:40:01+00:00Added an answer on May 29, 2026 at 4:40 am

    You can use the .serialize() method to easily post all the fields within the form. So in your case:

    var datastr = $("#sForm").serialize();
    

    Or without adding it to a string first:

    $.ajax({
        type: 'GET',
        url: 'submit.php',
        data: $("#sForm").serialize(),
        beforeSend:function(){
        ....
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following code which appears to work perfectly every time on Vista/Win7.
I'm using he following code the call a CFC which returns auto-suggest results through
I'm using the following code to post to the server which is then sent
Given the following lines of code which is using JQTOUCH: $('#customers').bind('pageAnimationEnd', function(e, info){ if
To scroll down my chat DIV I am using the following code which is
I'm using the following code to create an xls file from php. http://www.appservnetwork.com/modules.php?name=News&file=article&sid=8 However,
I have the following code which I am are currently using .... Basically, this
I'm using some Java code which produces the following interfaces. This code is non-modifiable.
I have the following code which works just fine when the method is POST,
I have the following code which I'm using to get the user to input

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.