It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Function Problem

Function Problem

Postby gtex on Mon Mar 19, 2007 11:14 am

Hi guys and girls,

I am trying to use the same function that does a calculation. I have several input boxes with ID pen_hours1, pen_hours2, pen_house3 ect

What i am trying to do no matter which input box is used it calls the same function but does a different calculation. As the function stands now it only calls the information from the first input field. What i would like is that it calls the information from the field that was just updated.

function testDiv(i_penalty, i_payrates) {
var myForm = document.form1.pen_hours1;
alert (myForm.value);
}

How do i go about changing pen_hours above so that it will be pen_hours1 for the first field and pen_hours2 for the second field. The i_penalty is the number of the field. Any help will be greatly welcome.

Thanks guy and girls
gtex
 
Posts: 0
Joined: Mon Mar 19, 2007 11:11 am

Who is online

Users browsing this forum: No registered users and 5 guests