Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.

1. Freelancing Ethics

I paid a programming freelancer to do a javascript calculator for my site. I was quite happy with it, until I found out it didn't work on Netscape. (Something I had specifically stated beforehand)

However, when I wrote to him about this I was told it would cost me more money.

I am hoping to get some free help on getting the calculator NS compatible, but I am also willing to pay if it's less than \$45 (his price)

<script language="JavaScript">
<!--

function totalCalc()
{
TotString = "";
base = 2.9 / 100;
baseCalc = 0
handling = 0.30;
sizeVal = 0;
effectVal = 0;
mediumVal = 0;
shippingVal = 0;
sizeVal = parseFloat(frmCalc.size.value);
effectVal = parseFloat(frmCalc.effect.value);
mediumVal = parseFloat(frmCalc.medium.value);
shippingVal1 = parseFloat(frmCalc.shipping1.value);
shippingVal2 = parseFloat(frmCalc.shipping2.value);
if (frmCalc.shipping1.checked == true)
shippingVal = shippingVal1;
else
shippingVal = shippingVal2;

baseCalc = ((sizeVal + effectVal + mediumVal + shippingVal) + ((sizeVal + effectVal + mediumVal + shippingVal) * base) + .30);
frmCalc.price.value = '\$' + (Math.round(baseCalc*Math.pow(10,2)))/Math.pow(10,2)
}
//-->
</script>

<form name="frmCalc" id="frmCalc">
<!-- The price values can be changed and added //-->

<div align="left">
<table border="0" cellpadding="4" cellspacing="4" style="border-collapse: collapse" bordercolor="#111111" width="340" id="AutoNumber1" align="left">
<tr>
<td width="155" align="left" valign="top">Size:<br>
<select size="1" name="size" id="size">
<option value="5.00" selected> 8 x 10</option><!-- Add: \$5.00 //-->
<option value="10.00">11 x 14</option><!-- Add: \$10.00 //-->
<option value="15.00">18 x 24</option><!-- Add: \$15.00 //-->
<option value="25.00">24 x 36+</option><!-- Add: \$25.00 //-->
</select></td>
<td width="184" align="left" valign="top">Effect:<br>
<select size="1" name="effect" id="effect">
<option value="0" selected>None</option><!-- Add: \$0.00 //-->
<option value="10">Watercolor</option><!-- Value: \$10.00 //-->
</select></td>
</tr>
<tr>
<td width="155" align="left" valign="top">Print Medium:<br>
<select size="3" name="medium" id="medium">
<option value="15.00" selected>Matte</option><!-- Value: \$15.00 //-->
<option value="20.00">High Gloss</option><!-- Value: \$20.00 //-->
<option value="60.00">Canvas</option><!-- Value: \$60.00 //-->
</select></td>
<td width="184" align="left" valign="top">Shipping:<br>
<input type="radio" value="6.00" checked name="shipping" id="shipping1">Standard (5 Days)<br><!-- Value: \$6.00 //-->
<input type="radio" value="12.00" name="shipping" id="shipping2">Rush Delivery (2 Days)<br><!-- Value: \$12.00 //-->

<font size=1>
<a href="#" onClick="window.open('shipping.html','mini','status,scrollbars,width=280,height=300'); return false;">
Shipping and Handling charges?
</a>
</font><br>
</td>
</tr>
<tr>
<td width="155" align="left" valign="top">

<!-- There is a hidden variable, handling,
that is dependent on the the total so far. The
formula is:
2.9% + \$0.30 = handling
//-->

<!-- Output is in dollar:cents format (\$00.00) //-->
Price: <input type="text" name="price" id="price" size="5"><br>
<input type="button" name="calc" id="calc" value="Calculate Price" onClick="totalCalc();">

</td>
<td width="184" align="left" valign="top"></td>
</tr>
</table>
</div>

</form>

• You're paying money for that? People regularly contribute significantly more complex scripts for free here... I'd say the person isn't that ethical if he thinks he can get away with that.

Anyway, making it work in NS is simply a matter of replacing "frmCalc" with "document.frmCalc" throughout the code.

• jkd is right. That's highly unethical, especially since the workable fix is so simple.

I took the liberty of making it a bit more flexible by adding helper functions to do repetitive tasks. Not to mention that any form like this with total represented in an input field should be read-only
Code:
```<html>
<title>TEST</title>

<script type="text/javascript" language="JavaScript">
<!--

function totalCalc( f )
{
var TotString    = "";
var base         = 2.9 / 100;
var baseCalc     = 0;
var handling     = 0.30;

var sizeVal      = setValSel( f.size );
var effectVal    = setValSel( f.effect );
var mediumVal    = setValSel( f.medium );
var shippingVal  = setValRadio( f.shipping );

baseCalc = ((sizeVal + effectVal + mediumVal + shippingVal) + ((sizeVal + effectVal + mediumVal + shippingVal) * base) + .30);
f.price.value = '\$' + (Math.round(baseCalc*Math.pow(10,2)))/Math.pow(10,2)

function setValSel( elem )
{
var v = elem.options[elem.selectedIndex].value;
return ( v == '' ) ? 0 : parseFloat( v );
}

{
for ( var i = 0; ( rb = group[i] ); i++ )
if ( rb.checked )
return parseFloat( rb.value );
else
return 0;
}
}
//-->
</script>

<form name="frmCalc">
<!-- The price values can be changed and added //-->

<div align="left">
<table border="0" cellpadding="4" cellspacing="4" style="border-collapse: collapse" bordercolor="#111111" width="340" id="AutoNumber1" align="left">
<tr>
<td width="155" align="left" valign="top">Size:<br>
<select size="1" name="size" id="size">
<option value="5.00" selected> 8 x 10</option><!-- Add: \$5.00 //-->
<option value="10.00">11 x 14</option><!-- Add: \$10.00 //-->
<option value="15.00">18 x 24</option><!-- Add: \$15.00 //-->
<option value="25.00">24 x 36+</option><!-- Add: \$25.00 //-->
</select>
</td>
<td width="184" align="left" valign="top">Effect:<br>
<select size="1" name="effect" id="effect">
<option value="0" selected>None</option><!-- Add: \$0.00 //-->
<option value="10">Watercolor</option><!-- Value: \$10.00 //-->
</select>
</td>
</tr>
<tr>
<td width="155" align="left" valign="top">Print Medium:<br>
<select size="3" name="medium" id="medium">
<option value="15.00" selected>Matte</option><!-- Value: \$15.00 //-->
<option value="20.00">High Gloss</option><!-- Value: \$20.00 //-->
<option value="60.00">Canvas</option><!-- Value: \$60.00 //-->
</select>
</td>
<td width="184" align="left" valign="top">
Shipping:<br>
<input type="radio" value="6.00" checked name="shipping">Standard (5 Days)<br><!-- Value: \$6.00 //-->
<input type="radio" value="12.00" name="shipping">Rush Delivery (2 Days)<br><!-- Value: \$12.00 //-->
<font size=1><a href="#" onClick="window.open('shipping. html','mini','status,scrollbars,width=280,height=300'); return false;">Shipping and Handling charges?</a></font>
</td>
</tr>
<tr>
<td width="155" align="left" valign="top">

<!-- There is a hidden variable, handling,
that is dependent on the the total so far. The
formula is:
2.9% + \$0.30 = handling
//-->

<!-- Output is in dollar:cents format (\$00.00) //-->
Price: <input type="text" name="price" id="price" size="5" readonly="true"><br>
<input type="button" name="calc" id="calc" value="Calculate Price" onClick="totalCalc( this.form );">
</td>
<td width="184" align="left" valign="top">
</td>
</tr>
</table>
</div>

</form>

</body>
</html>```
Feel free to contact me if you have any more problems.

For me it seems that the trouble could have been spared if both of you (crubbles and the freelancer, not jkd and beetle ) had signed a written contract that sketched out the requirements on paper. With that you could have simply pointed the freelancer at the right passage and require from him that he delivers the script crossbrowser-compatible without any additional cost than the original cost negotiated or he won't get paid at all. This practice would also be the freelancer's best way of handling this, because it also binds you as the client to the contract.

Since I don't know the details of your deal, I'm speculating now but nevertheless I'll play advocatus diaboli: It's not so uncommon judging from my experience that small tasks suffer from featuritis and scope creep, and that's often the case if all you have is some verbal agreement to the deal and no contract, roadmap whatsoever, but a fixed price instead. That means that every extra hour spent on the project diminishes the net income for the freelancing developer, and that's why often even small changes are charged to prevent the situation described earlier.

I don't have the same information as you have, so I'm just saying this for the sake of completeness, FWIW. If you haven't had a written contract, think about it the next time. If you had one already, disregard my scribbling.

• Originally posted by jkd
You're paying money for that? People regularly contribute significantly more complex scripts for free here... I'd say the person isn't that ethical if he thinks he can get away with that.
Well, presumably crubbles also paid for a script tailored for his specific needs, not only for the naked (yet broken ) functionality. That's also time that gets billed.

• methinks I got ripped...

thanks much for the new code! I like the read-only feature!!

I can't believe people are willing to do this for free however ... this site can't be a total service ...can it??

• There was a "contract" of sorts...it wasn't a verbal agreement. I posted on freelancewebprojects.com and specified that in my post for a bid.

However, payment was supposed to signify completion of project. And I didn't test it to make sure it was cross-browser compatible...so yes, it goes both ways.

Thanks Mordred, it was a learning experience.

• Total service? No. And honestly, I think it would be just as un-ethical for somebody to try and garner so much work from good-natured persons (and I am in no way suggesting that you would)

I make a living doing this stuff

I agree mordred. I never do any work w/o something being signed (digitally or in person) unless it's a favor, and I always put the scope in writing as well.

• Originally posted by beetle
I make a living doing this stuff
So do I...

I never do any work w/o something being signed (digitally or in person) unless it's a favor, and I always put the scope in writing as well.
Did you learn that the hard way (as I did) or not?

Quite recently I had to deal with the programming part of a project that went out of scope beyond all recognition. What started as "a simple logo" evolved from "navigation graphic" over "html page with navigation graphic" to "fully configurable, hierarchical, horizontal navigation bar in CI design". I'm still angry at management because they decided not to sign a written contract for "such a small project".

If you want to have a good laugh hearing what clients expect a simple javascript to do just say so and I start venting.

• The hard way, of course

Well, that and I watched other people suffer from it worse than I. I just did a \$150 template for a guy here in the office. I told him, "Sure, but I take half up front and half upon completion". I think I knocked him loose from his boots for a bit, but after shaking his head like a wet cat, he said, "I'll go cut you a check". Sure, many people will think that's odd or silly for \$150, but hey, I made rules for myself and I stick to them. If the project is under \$50, I take it all up front.

By the time you are ready to start work, you are the person who has already given (quoting project, reasearch, document preparation, etc). Once you've done all that preliminary work and the client agrees, it's time for them to commit. If people aren't going to commit to your work and actually be part of the project, you have no business whatsoever working on it.

• I do have a few questions about beetles code...

-What does the second 'function' do?

-The shipping options are reversed or something...I test it out, and 'Rush' is less than 'Standard' this wasn't the case before ...perhaps I can just switch the values, hmm, i'll see how that works out...

• Oop, sorry about that. Change the 2nd inner function to this...
Code:
```    function setValRadio( group )
{
for ( var i = 0; ( rb = group[&#105;] ); i++ )
if ( rb.checked )
return parseFloat( rb.value );
return 0;
}```
BTW, that's what they are called, inner functions. They reside inside the variable namespace of the outer function, so are less likely to cause any type of conflict with any other javascript you may add later.

The same logic has to be repeated to properly get the value from the SELECT elements. Rather than typing out that logic for each element, I just made a helper function that abstracts the process, making it much more efficient, scalable, flexible.

• Originally posted by beetle
I make a living doing this stuff
I don't.
I would definitely love to freelance a bit though...

• I would definitely love to freelance a bit though...
Meaning I can contact you for future projects? All I want is someone who will deal straight...

• Originally posted by crubbles
Meaning I can contact you for future projects? All I want is someone who will deal straight...
Not right now, but over summer, sure thing. Classes are already taking all my free time (and sleep too), and last thing I need is contractual obligations... but summer, yeah.

•
Page 1 of 2 12 Last

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•