Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

auto compute

9:50 am on Aug 28, 2011 (gmt 0)

New User

5+ Year Member

joined:Aug 28, 2011
posts: 3
votes: 0

is it possible create an auto pro rata calculator in java where there are four [4] boxes. first box should be where we could enter the customer's plan [29,39,40 etc.] and it should be divided with what ever i will enter on the second box w/c will be for the number of days in a month [28,29,30,31]. the 3rd box should be where i can enter the number of days the cust. was able to use the service and it needs to be multiplied from box 2. 4th box should be a read only box where the pro rata will be displayed.


[box 1] divided "/" by [box 2] multiplied "*" by [box 3] equals "=" to box four
8:55 am on Aug 29, 2011 (gmt 0)

Junior Member

5+ Year Member

joined:July 8, 2010
posts: 114
votes: 0

That shouldn't be to hard....

function calculate() {
var frm = document.getElementById('calculator');
frm['box4'].value = ( frm['box1'].value / frm['box2'].value ) * frm['box3'].value;
// Stop form from submitting
return false;

<form id="calculator" onsubmit="return calculate();">
<input type="text" name="box1"><br>
<input type="text" name="box2"><br>
<input type="text" name="box3"><br>
<input type="text" name="box4" READONLY><br>
<input type="submit" value="Calculate" onclick="calculate();">
9:23 am on Aug 29, 2011 (gmt 0)

New User

5+ Year Member

joined:Aug 28, 2011
posts: 3
votes: 0

thank you so much sir! you save my life!

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members