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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:41:32+00:00 2026-06-12T18:41:32+00:00

I am trying to process my form through a live server from my native

  • 0

I am trying to process my form through a live server from my native app without leaving the page. Below is the code I am using for the form, the JQuery and the PHP, but when i send it, the page goes blank and puts the string in the URL bar. Can I get some help with my code please. I shortened the form on this to make it easier to read, i have alot of other fields as well. Do I need to have them all listed in the javascript?

HTML on Form

<form action="http://mobile.koolantkoolers.com/mailer.php" method="get">
  <div data-role="fieldcontain">
    <label for="name">Name:</label>
    <input type="text" name="name" id="name" value=""  />
</div>
<div data-role="fieldcontain">
  <label for="email">Email:</label>
  <input type="email" name="email" id="email" value=""  />
</div>

  <div data-role="fieldcontain">
    <label for="company">Company:</label>
    <textarea cols="40" rows="8" name="company" id="company"></textarea>
  </div>
<input type="button" onclick="submit()" value="submit" data-icon="star" data-theme="b" />              
  </div>
  </form>

JavaScript:

$.post('http://mobile.koolantkoolers.com/mailer.php', {

// These are the names of the form values

Name: $('name').val(),
Email: $('email').val(),
Company: $('company').val()

// HTML function

}, function (html) {
    // Place the HTML in a astring
    var response=html;

    // PHP was done and email sent
    if (response=="success") {
        alert("Message sent!"); 
    } else {

        // Error postback
        alert("Sorry please fill all fields!"); 
    return false;
   }
});

and then PHP

<?php

// VARS
$Name=$_GET["name"];
$Email=$_GET["email"];
$Company=$_GET["company"];
$Headers = "From:" . $Email;

//VALIDATION
if(
$Name=="" ||
$Email=="" ||
$Company==""
) {
    echo "Error";
} else {
    mail("nnorman@dimplexthermal.com","mobile app message",$MessageText, $Headers);
    echo "Success";
}
?>
  • 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-12T18:41:33+00:00Added an answer on June 12, 2026 at 6:41 pm

    I ended up using the following code and post method on my php. You just need to make sure your div naming convention matches up to you code. This posts the results of the form and swaps the div out with a thank you message. See my HTML and Javascript below.

    <div data-role="content">
    <form id="myform">
      <div data-role="fieldcontain">
        <label for="name">Name:</label>
        <input type="text" name="name" id="name" value=""  />
    </div>
    <div data-role="fieldcontain">
      <label for="email">Email:</label>
      <input type="email" name="email" id="email" value=""  />
    </div>
    <div data-role="fieldcontain">
      <label for="company">Company Name:</label>
      <input type="text" name="company" id="company" value=""  />
    </div>        
    <input type="submit" name="submit" value="Submit" data-icon="star" data-theme="b" />
    </form>
    
    </div>
    <div data-role="content" style="display:none" id="formResponse">
        thank you, your quote has been received and you will hear back from us shortly.
        </div>
    

    Javascript:

    $(document).ready(function() {
                //When the form with id="myform" is submitted...
                $("#myform").submit(function() {
                    //Send the serialized data to mailer.php.
                    $.post("mailer.php", $("#myform").serialize(),
                        //Take our repsonse, and replace whatever is in the "formResponse"
                        //div with it.
    
                        function(data) {
                        $("#myform").html( $("#formResponse").html() );
                        }
                    );
                    return false;
                });
    
            });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to process the response from paypal on my page. I found
I am trying to submit a form through ajax using GET method. It works
I am trying to process the submitted results for a form, containing data for
I am trying to process xml files using Hadoop's StreamInputFormat. And I am using
I'm trying to process data obtained from a run of diff to an instance
I am trying to process 114,000 rows in a dataset (populated from an oracle
I am trying to process both .aspx and non-extension page requests (i.e. both contact.aspx
I have a form. I am trying to validate it through AJAX GET requests.
Good evening guys, I'm trying to pass multiple checkbox values through AJAX and process
I am trying to create a car make/model form using Javascript or AJAX, problem

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.