W
wutzke
I started working on a script that would take the cost of something
and suggest a retail amount.
I usually figure Retail on Margins. So Retail equals Cost divided by
(Margin-100)% plus Cost.
So if Cost is $50 and Margin is 40%
50/(40-100)%+50=80
or
(50/60%)+50=80
But now I have to go to work...
</FORM>
<table border="1" cellpadding="0" cellspacing="0" style="border-
collapse: collapse" bordercolor="#111111" width="48%">
<tr>
<td width="20%"><FORM NAME="Calc">
<TABLE BORDER=4>
<TR>
<TD>
<INPUT TYPE="text" NAME="Input" Size="16">
<br>
</TD>
</TR>
<TR>
<TD>
<INPUT TYPE="button" NAME="one" VALUE=" 1 "
OnClick="Calc.Input.value += '1'">
<INPUT TYPE="button" NAME="two" VALUE=" 2 "
OnCLick="Calc.Input.value += '2'">
<INPUT TYPE="button" NAME="three" VALUE=" 3 "
OnClick="Calc.Input.value += '3'">
<INPUT TYPE="button" NAME="plus" VALUE=" + "
OnClick="Calc.Input.value += ' + '">
<br>
<INPUT TYPE="button" NAME="four" VALUE=" 4 "
OnClick="Calc.Input.value += '4'">
<INPUT TYPE="button" NAME="five" VALUE=" 5 "
OnCLick="Calc.Input.value += '5'">
<INPUT TYPE="button" NAME="six" VALUE=" 6 "
OnClick="Calc.Input.value += '6'">
<INPUT TYPE="button" NAME="minus" VALUE=" - "
OnClick="Calc.Input.value += ' - '">
<br>
<INPUT TYPE="button" NAME="seven" VALUE=" 7 "
OnClick="Calc.Input.value += '7'">
<INPUT TYPE="button" NAME="eight" VALUE=" 8 "
OnCLick="Calc.Input.value += '8'">
<INPUT TYPE="button" NAME="nine" VALUE=" 9 "
OnClick="Calc.Input.value += '9'">
<INPUT TYPE="button" NAME="times" VALUE=" x "
OnClick="Calc.Input.value += ' * '">
<br>
<INPUT TYPE="button" NAME="clear" VALUE=" c "
OnClick="Calc.Input.value = ''">
<INPUT TYPE="button" NAME="zero" VALUE=" 0 "
OnClick="Calc.Input.value += '0'">
<INPUT TYPE="button" NAME="DoIt" VALUE=" = "
OnClick="Calc.Input.value = eval(Calc.Input.value)">
<INPUT TYPE="button" NAME="div" VALUE=" / "
OnClick="Calc.Input.value += ' / '">
<br>
</TD>
</TR>
</TABLE></td>
<td width="80%"><script language="JavaScript"><!--
function setForm2Value() {
var selectedItem =
document.formName1.selectName1.selectedIndex;
var selectedItemValue =
document.formName1.selectName1.options[selectedItem].value;
var selectedItemText =
document.formName1.selectName1.options[selectedItem].text;
if (selectedItem != 0) {
document.formName2.textboxName1.value = selectedItemText;
document.formName2.textboxName2.value = selectedItemValue;
}
else {
document.formName2.textboxName1.value = "";
document.formName2.textboxName2.value = "";
}
}
//--></script>
<form>
<input type="text" name="T1" size="20" value="0.00">
</form>
<p>
<form name="formName1">
<input type="button" value="30%" name="B1">
<input type="button" value="40%" name="B2">
<input type="button" value="50%" name="B3">
<input type="text" name="T1" size="20"><br>
$.00<input type="radio" value="V1" checked name="R1">
<input type="radio" name="R1" value="V2">$.95
<input type="radio" name="R1" value="V3">$.99<br>
</form>
<p>
<form name="formName2">
Cost of
<input type="textbox" name="textboxName1" value="" size="10">
at
<input type="textbox" name="textboxName2" value="" size="10">%
Margin<br>
is
<input type="textbox" name="textboxName3" value="$.99" size="10">
</form></td>
</tr>
</table>
and suggest a retail amount.
I usually figure Retail on Margins. So Retail equals Cost divided by
(Margin-100)% plus Cost.
So if Cost is $50 and Margin is 40%
50/(40-100)%+50=80
or
(50/60%)+50=80
But now I have to go to work...
</FORM>
<table border="1" cellpadding="0" cellspacing="0" style="border-
collapse: collapse" bordercolor="#111111" width="48%">
<tr>
<td width="20%"><FORM NAME="Calc">
<TABLE BORDER=4>
<TR>
<TD>
<INPUT TYPE="text" NAME="Input" Size="16">
<br>
</TD>
</TR>
<TR>
<TD>
<INPUT TYPE="button" NAME="one" VALUE=" 1 "
OnClick="Calc.Input.value += '1'">
<INPUT TYPE="button" NAME="two" VALUE=" 2 "
OnCLick="Calc.Input.value += '2'">
<INPUT TYPE="button" NAME="three" VALUE=" 3 "
OnClick="Calc.Input.value += '3'">
<INPUT TYPE="button" NAME="plus" VALUE=" + "
OnClick="Calc.Input.value += ' + '">
<br>
<INPUT TYPE="button" NAME="four" VALUE=" 4 "
OnClick="Calc.Input.value += '4'">
<INPUT TYPE="button" NAME="five" VALUE=" 5 "
OnCLick="Calc.Input.value += '5'">
<INPUT TYPE="button" NAME="six" VALUE=" 6 "
OnClick="Calc.Input.value += '6'">
<INPUT TYPE="button" NAME="minus" VALUE=" - "
OnClick="Calc.Input.value += ' - '">
<br>
<INPUT TYPE="button" NAME="seven" VALUE=" 7 "
OnClick="Calc.Input.value += '7'">
<INPUT TYPE="button" NAME="eight" VALUE=" 8 "
OnCLick="Calc.Input.value += '8'">
<INPUT TYPE="button" NAME="nine" VALUE=" 9 "
OnClick="Calc.Input.value += '9'">
<INPUT TYPE="button" NAME="times" VALUE=" x "
OnClick="Calc.Input.value += ' * '">
<br>
<INPUT TYPE="button" NAME="clear" VALUE=" c "
OnClick="Calc.Input.value = ''">
<INPUT TYPE="button" NAME="zero" VALUE=" 0 "
OnClick="Calc.Input.value += '0'">
<INPUT TYPE="button" NAME="DoIt" VALUE=" = "
OnClick="Calc.Input.value = eval(Calc.Input.value)">
<INPUT TYPE="button" NAME="div" VALUE=" / "
OnClick="Calc.Input.value += ' / '">
<br>
</TD>
</TR>
</TABLE></td>
<td width="80%"><script language="JavaScript"><!--
function setForm2Value() {
var selectedItem =
document.formName1.selectName1.selectedIndex;
var selectedItemValue =
document.formName1.selectName1.options[selectedItem].value;
var selectedItemText =
document.formName1.selectName1.options[selectedItem].text;
if (selectedItem != 0) {
document.formName2.textboxName1.value = selectedItemText;
document.formName2.textboxName2.value = selectedItemValue;
}
else {
document.formName2.textboxName1.value = "";
document.formName2.textboxName2.value = "";
}
}
//--></script>
<form>
<input type="text" name="T1" size="20" value="0.00">
</form>
<p>
<form name="formName1">
<input type="button" value="30%" name="B1">
<input type="button" value="40%" name="B2">
<input type="button" value="50%" name="B3">
<input type="text" name="T1" size="20"><br>
$.00<input type="radio" value="V1" checked name="R1">
<input type="radio" name="R1" value="V2">$.95
<input type="radio" name="R1" value="V3">$.99<br>
</form>
<p>
<form name="formName2">
Cost of
<input type="textbox" name="textboxName1" value="" size="10">
at
<input type="textbox" name="textboxName2" value="" size="10">%
Margin<br>
is
<input type="textbox" name="textboxName3" value="$.99" size="10">
</form></td>
</tr>
</table>