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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:51:39+00:00 2026-06-14T12:51:39+00:00

I have two forms on a single page and I want to submit the

  • 0

I have two forms on a single page and I want to submit the forms individually using the corresponding links from a query mobile navbar. The forms submit fine but the content portion of the page goes blank (I believe the jquery mobile ajax is trying to transition to a page that is not specified). Is there a way to stop it trying to transition and just submit the form data?

HTML:

<div class="ui-grid-a">
            <div class="ui-block-a">
            <form name="adminform" id="adminform">
                  <legend>Administrator</legend>

                  <input type="text" name="user_id" id="user_id" value="<?php echo $user_data['user_id'];?>" />

                  <label for="first_name">First name*:</label>
                  <input type="text" name="first_name" id="first_name" value="<?php echo $user_data['first_name'];?>" placeholder="First name" />

                  <label for="last_name">Last Name*:</label>
                  <input type="text" name="last_name" id="last_name" value="<?php echo $user_data['last_name'];?>" placeholder="Last Name" />

                  <label for="email">E-Mail*:</label>
                  <input type="email" name="email" id="email" value="<?php echo $user_data['email'];?>" placeholder="E-Mail" />

            </form>

            </div><!--end block a-->
            <div class="ui-block-b">
              <form name="companyform" id="companyform" action="" method="post">

                  <legend>Billing Address</legend>

                  <!--<label for="companyid">Company Id:</label>-->
                  <input type="hidden" name="companyid" id="companyid" value="<?php echo $company_data['company_id'];?>" />

                  <label for="company_name">Company Name*:</label>
                  <input type="text" name="company_name" id="company_name" value="<?php echo $company_data['company_name'];?>" />

                  <label for="company_website">Website:</label>
                  <input type="text" name="company_website" id="company_website" value="<?php echo $company_data['company_website'];?>" />

                  <label for="company_address">Address*:</label>
                  <input type="text" name="company_address" id="company_address" value="<?php echo $company_data['company_address'];?>" />

                  <label for="company_suite">Suite:</label>
                  <input type="text" name="company_suite" id="company_suite" value="<?php echo $company_data['company_suite'];?>" />

                  <label for="company_city">City*:</label>
                  <input type="text" name="company_city" id="company_city" value="<?php echo $company_data['company_city'];?>" />

                  <label for="company_state">State*:</label>
                  <input type="text" name="company_state" id="company_state" value="<?php echo $company_data['company_state'];?>" />

                  <label for="company_postal_code">Postal Code*:</label>
                  <input type="text" name="company_postal_code" id="company_postal_code" value="<?php echo $company_data['company_postal_code'];?>" />

                  <label for="company_telephone">Telephone*:</label>
                  <input type="text" name="company_telephone" id="company_telephone" value="<?php echo $company_data['company_telephone'];?>" />

                  <label for="company_fax">Fax:</label>
                  <input type="text" name="company_fax" id="company_fax" value="<?php echo $company_data['company_fax'];?>" />

              </form>

              <div id="companyupdatestatus"></div>
            </div><!--end block b-->  
        </div><!--end grid a-->

        <div data-role="navbar">
            <ul>
                <li><a id="updateadmin" data-icon="check" data-ajax="false">Update Admin</a></li>
                <li><a id="updatecompany" data-icon="check" data-ajax="false">Update Company Info</a></li>
                <li><a href="passwordchangeform.php" data-role="button" data-icon="check" data-transition="pop" data-rel="dialog">Change Password</a></li>
            </ul>
        </div>        

       </div>

Javascript:

$('#updatecompany').click(function() {
var company = $('#companyform').serializeArray();
/*$('#companyupdatestatus').html(company);*/

$.ajax({
type: "POST",
url: 'companyupdate.php',
data: company,
success: function(company) {
    $('#companyupdatestatus').html(company);
}   

}); 
});

Thanks in advanced, would really appreciate the help!!! Adam

  • 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-14T12:51:41+00:00Added an answer on June 14, 2026 at 12:51 pm

    Try return false like this:

      $('#updatecompany').click(function() {
           var company = $('#companyform').serializeArray();
           /*$('#companyupdatestatus').html(company);*/
    
        $.ajax({
        type: "POST",
        url: 'companyupdate.php',
        data: company,
        success: function(company) {
            $('#companyupdatestatus').html(company);
        }   
    
        }); 
    
             return false;
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to have two separate forms on a single create page and one
I have two forms on my page. I want to submit one form only.
I have two forms, and so two different submit buttons, for one page (page
I have two forms on one page and want to have the input boxes
I have two forms on a single page. Actually they're seperated pages but the
I have two forms on a single page. One is just a form for
Is it possible for me to have two self submitting forms on a single
I have two forms and form1 needs to get data from form2 , i
I have two forms on my website, and I use jQuery to submit them,
I have two forms. First one is to decide button numbers by using jslider.

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.