Getting labels to update using document.dataform

I have built 3 web pages that have data input and then a calculation. I cloned one of the pages for a new calculation but now I can’t get one of the code lines to work. Here is the section that sets the names:

document.dataform.op2.value=document.dataform.cname.value+‘s/hour’;
document.dataform.op.value=document.dataform.cname.value+‘s’;

The following line works fine at displaying the currency name input by adding “s/hour” to the end of the currency name:
input name=“op2” size=“30” value=“dollars/hour” style=“border:0px;”

But, the “op” code to just add an “s” never updates the label:
input name=“op” size=“30” value=“dollars” style=“border:0px;”

The code that doesn’t work is in two places and both are below the one that does work.

Any thoughts? I had to remove the <> signs to make the two input lines visible.