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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:28:45+00:00 2026-06-03T18:28:45+00:00

I had a form with textboxes, when enduser enter the values into the fields

  • 0

I had a form with textboxes, when enduser enter the values into the fields of the form they will be submitted to a calculation page and they again return the calculated values to the same form with without refresh and the calculated output should be displayed. Is it possible to do with ajax/jquery and php.
My form code is like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
    <style type="text/css">@import "css/jquery.datepick.css";</style> 
    <script type="text/javascript" src="js/jquery.datepick.js"></script>
    <link rel="stylesheet" type="text/css" href="css/css.css"/>
    </head>

    <body>
    <div id="formwraper">
    <div  id="doctorstitle"><h1> Vitals</h1><br/></div>  
    <div id="formbody">

      <form  name="vitals" method="post" action="calculator.php" onSubmit="return false";>
      <div  id="formpoints">   
      <div id="left">
      Age:
      </div>
        <div id="right">    
        <input type="text" name="age" id="age" />
        </div>
    </div>
          <div  id="formpoints">   
      <div id="left">
      Height (in cms):
      </div>
        <div id="right">    
        <input type="text" name="height" id="height" />
        </div>
    </div>
          <div  id="formpoints">   
      <div id="left">
      Weight (in kgs):
      </div>
        <div id="right">    
        <input type="text" name="Weight" id="Weight" />
        </div>
<div> Calculated BMI value here</div>

I want to display this value based on the above three values without refresh and submit button

</div>
          <div  id="formpoints">   
      <div id="left">
      Systolic BP:
      </div>
        <div id="right">    
        <input type="text" name="Systolic BP" id="Systolic BP" />
        </div>
    </div>
          <div  id="formpoints">   
      <div id="left">
      Diastolic BP:
      </div>
        <div id="right">    
        <input type="text" name="Diastolic BP" id="Diastolic BP" />
        </div>
    </div>
          <div  id="formpoints">   
      <div id="left">
      Pulse:
      </div>
        <div id="right">    
        <input type="text" name="pulse" id="pulse" />
        </div>
    </div>
          <div  id="formpoints">   
      <div id="left">
      Temperature:
      </div>
        <div id="right">    
        <input type="text" name="Temp" id="Temp" />
        </div>
    </div>
          <div  id="formpoints">   
      <div id="left">
      General Health status:
      </div>
        <div id="right">    
        <input type="text" name="ghs" id="ghs" />
        </div>
    </div>
          <div  id="formpoints">   
      <div id="left">
      Emergency :
      </div>
        <div id="right">    
        <input type="text" name="emergency" id="emergency" />
        </div>
    </div>
      </form>
        <script>
        $("button").click(function(){
    $.post("calculator.php",$(vitals).serialize(),function(result)
    {
    $(vitals).html(result);}
    );
    });

        </script>
        </div>

    </body>
    </html>

Can anyone please help me in this regard

Thanks in advance
Ramsai

  • 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-03T18:28:48+00:00Added an answer on June 3, 2026 at 6:28 pm
    $("button").click(function(){
    $.post("php page url",$(form_id).serialize(),function(result)
    {
    $(form_id).html(result);}
    );
    });
    

    Note:
    1)In php Page, echo All the input ,textareas with values which are submitted

    2)Add attribute to form tag onSubmit=”return false;”

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

Sidebar

Related Questions

I had developed one website purely in HTML .I have my form with fields
I have a form with 3 text fields and 3 checkboxes. I had implemented
So I have a page, it had multiple textboxes, linkbuttons, and buttons. Currently, a
I had written an event handler for MouseMove for my form but When I
i had sideshow ajax and i want it get images form database i used
I've had troubles for a few days already with handling form that contains dropdown
I really like Play 2.0's form mapping system, but I had a question about
Looking for a non-JS solution. Say I had something like this: <ul> <li> <form>
Had a page that was working fine. Only change I made was to add
I had a main form. I created a child form that is instantiated by

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.