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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:38:35+00:00 2026-06-11T01:38:35+00:00

<form action=testing.php method=POST id=addreciept name=addreciept> Unit<input name=unit1 type=text id=unit1 size=17 onkeyup=calc() value=0/> Rate<input name=rate1

  • 0
<form action="testing.php" method="POST" id="addreciept" name="addreciept">
Unit<input name="unit1" type="text" id="unit1" size="17" onkeyup="calc()"   value="0"/>
Rate<input name="rate1" type="text" id="rate1" size="17" value="0" onkeyup="calc()"  />
Amount<input name="amount1" type="text" id="amount1" size="17"  disabled="true"   />
Total Amount: <input type="text" name="totalamount" id="totalamount" disabled="true"   value=""> 
Amount Paid: <input type="text" name="amount_paid" id="amount_paid" onkeyup="calc_balance()" />
Balance: <input type="text" name="balance" id="balance" disabled="true"  value="0"> 
<center>
<input type="submit" value="Save " class="button" >
</center>
</form>

<script>
function calc()
{
unit=document.getElementById('unit1').value;
rate=document.getElementById('rate1').value;
amount=unit*rate;
document.getElementById('amount1').value=amount;
total_amount=document.getElementById('amount1').value;
document.getElementById('totalamount').value=total_amount;
}
function calc_balance()
{
tota_amount=document.getElementById('totalamount').value;
paid_amount=document.getElementById('amount_paid').value;
document.getElementById('balance').value=tota_amount-paid_amount;
}
</script>

I recently tested the script posted on net , it works, but I guess I am doing something wrong :'( i am badly stuck in it, because the dynamic variables like, amount1, totalamount & balance are causing error of undefined index amount1 etc etc

plz figure it out 🙁

php is just simple >>

<?php
echo $_POST['unit1'];
echo $_POST['rate1'];
echo $_POST['amount1'];
?>
  • 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-11T01:38:37+00:00Added an answer on June 11, 2026 at 1:38 am

    form-elements will not be submitted when they are disabled(amount1,totalamount and balance are disabled)

    Use the readonly-attribute instead

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

Sidebar

Related Questions

<form action = settings.php method = post> Student ID*: <input type = text name
I created this form: <form method=post action=process-form.php id=emailForm name=emailForm target=_self> <h4>Sign up to be
I have the following form that has 2 selects: <form id=form class=form_visitar method=post action=ajax/selects.php>
I have these codes: testing.php <html> <head> <script type=text/javascript> function copy_data(id){ var a =
UPDATED CODE: Now, I have this code: <h2>Testing</h2> <input type=checkbox name=fruit1 id=id1 class=box>Banana<br /><br
I am testing Html form using post method and got this odd result: I
i.e. - <form action=http://192.168.1.20/form_action.asp method=get> vs. ( without a specific handler, still valid html?
Form_Ajax.php => <script type=text/javascript src=Testing_Ajax.js></script> <script type=text/javascript src=jquery-1.5.js></script> <script type=text/javascript src=myjquery.js></script> <style> .cls_display{ background-color:
Here is my script.: <html> <body> <?php if(isset($_POST['submit'])) { echo $_FILES['upload']['tmp_name']/['name']/['error']/['type']; // i.e. echoing
it it possible to get the form action of a GET form on submit

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.