First off, I am a javascript newb so please be patient with me :).
I am building our office a new mileage report form for personal vehicle use. I'd like for them to be able to check a box at the end of a line, and that box to copy what is in my destination1 to origin 2 box, and the origin1 to destination 2 box, and the totalmile box to copy down as well.
Essentially, it will be a reverse copy of the previous line, though I realize I can't just put a statement in there to reverse the boxes and will have to link the boxes I want copies with the new boxes.
Any thoughts on the best way to do this?
Can I use a if (this.getField("check1").value=="Yes") with conditions that say a destination1=origin2 kind of thing?
Any help would be greatly appreciated. :)
Thanks a lot.
Dylan.
Let me lay out the form a bit so you can better understand what its like.
On a line we have Date | Odometer Start | Origin | Destination| Odometer End | Total Miles | Round-Trip Checkbox.
Could I write a script so that when they check the box, it takes the Odometer End value and adds it to the Total Miles value, and then inserts it into the Odometer End box? Can that be done along with adding the text "and back to origin" in the destination box?
That would double the amount of lines the employees have on the form.
Thanks for your help!
Javascript NEWB