Request for JS quote

E

Evertjan.

Shaun Furlong wrote on 18 sep 2006 in comp.lang.javascript:
I need a quote for a simple "Density Calculator" in JS.

As long as you do not topquote,
quoting is free on this NG.

It is strange however,
when one uses "I need",
while meaning "I want".

;-}
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated
Mon, 18 Sep 2006 13:25:38 remote, seen in
Shaun Furlong said:
I'm new to this group - and newsgroups in general - so I aplogize if I'm out
of line here...

If you had been intelligent enough to read past posts for a while before
posting, you would not have felt a need to write something like that.
The FAQ, and RFC1855 which it cites, would have told you what you need
to know.
I'm a web designer, but not proficient in JS.

I need a quote for a simple "Density Calculator" in JS. Here are two
examples (not JS):

Examples on the Web are not convenient for those not using permanent
connections.

I usually calculate density by dividing the mass in kilograms by the
volume in cubic metres.

A quote can either be text extracted from elsewhere (e.g. "Eschew
Surplusage") or be a firm estimate of the cost of a task. It might
alternatively mean, in poor English, a link to a Web site.

Learn to write intelligible, unambiguous English - after all, the Danes
and the Dutch can do so, so why not you?

It's a good idea to read the newsgroup and its FAQ.
 
S

Shaun Furlong

It is strange however,
when one uses "I need",
while meaning "I want".

Thanks. It may not be technically correct, but there's nothing strange about
it. People use the word that way all the time. ;-)
 
M

McKirahan

Shaun Furlong said:
I'm new to this group - and newsgroups in general - so I aplogize if I'm out
of line here...

I'm a web designer, but not proficient in JS.

I need a quote for a simple "Density Calculator" in JS. Here are two
examples (not JS):

1. http://www.cheeseman.com/Density-Calculator.asp
2.
http://www.myyellow.com/dynamic/services/yfsdensitycalculator/sitedensitycal
culator.jsp?PARENT=yfscjhowtoshipfromservices


Will this help -- though it has no error checking?

<html>
<head>
<title>Density Calculator</title>
<script type="text/javascript">
function calc() {
var decs = 5; // = decimal positions displayed
var form = document.form1;
var l_ft = parseInt(form.L_ft.value,10);
var l_in = parseInt(form.L_in.value,10);
var w_ft = parseInt(form.W_ft.value,10);
var w_in = parseInt(form.W_in.value,10);
var h_ft = parseInt(form.H_ft.value,10);
var h_in = parseInt(form.H_in.value,10);
var o_lb = parseInt(form.O_lb.value,10);
var o_oz = parseInt(form.o_Oz.value,10);
var c_ft = l_ft * w_ft * h_ft;
var c_in = l_in * w_in * h_in;
var cube = (12 * c_ft + c_in) / 12;
var wait = (16 * o_lb + o_oz) / 16;
var dens = wait / cube;
dens = dens.toString()
if (dens.indexOf(".") >= 0) {
dens = dens.substr(0,dens.indexOf(".")+decs+1);
}
form.Cube.value = cube;
form.Dens.value = dens;
}
function init() {
var form = document.form1;
form.L_ft.focus();
form.L_ft.select();
}
window.onload = init;
</script>
</head>
<body>
<pre>
<b>Calculate Density</b>
<form name="form1">
<b>Length: </b><input type="text" name="L_ft"
size="6" value="0" style="text-align:right"> Feet
<b> </b><input type="text" name="L_in"
size="6" value="0" style="text-align:right"> Inches
<b>Width : </b><input type="text" name="W_ft"
size="6" value="0" style="text-align:right"> Feet
<b> </b><input type="text" name="W_in"
size="6" value="0" style="text-align:right"> Inches
<b>Height: </b><input type="text" name="H_ft"
size="6" value="0" style="text-align:right"> Feet
<b> </b><input type="text" name="H_in"
size="6" value="0" style="text-align:right"> Inches
<b>Weight: </b><input type="text" name="O_lb"
size="6" value="0" style="text-align:right"> Pounds
<b> </b><input type="text" name="o_Oz"
size="6" value="0" style="text-align:right"> Ounces
<input type="button" value="Calculate" onclick="calc()"
style="background-color:white; width:110px">
<b> </b><input type="text" name="Cube" readonly
size="6" value="0" style="text-align:right"> Cubic Feet (ft<sup>3</sup>)
<b> </b><input type="text" name="Dens" readonly
size="6" value="0" style="text-align:right"> lbs/ft<sup>3</sup>
<input type="reset" value="Clear" onclick="init()"
style="background-color:white; width:110px">
</form>
</pre>
</body>
</html>

Watch for word-wrap.

It may not be the best solution but it is "a" solution.

Or did you "need" to pay for a solution.
 
E

Evertjan.

Shaun Furlong wrote on 19 sep 2006 in comp.lang.javascript:
Thanks. It may not be technically correct, but there's nothing strange
about it. People use the word that way all the time. ;-)

People can act strange all the time,
as I wanted but not needed to say.

The above proves that your 'all the time',
in the case of need/want, is not correct,
and expect you to respond
that people use 'all the time' all the time,
when they mean sometimes.

I submit that for programmers,
exactness in their statements
is as important as exactness in their functions.

;-}
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated
Tue, 19 Sep 2006 11:09:52 remote, seen in
McKirahan said:
Will this help -- though it has no error checking?
var c_ft = l_ft * w_ft * h_ft;
var c_in = l_in * w_in * h_in;
var cube = (12 * c_ft + c_in) / 12;

Why do you not stick to topics that you understand? Take a cubic foot
of wood, saw it into cubic inches, and count them.

Watch for word-wrap.

That's the author's responsibility; do not shirk it.
It may not be the best solution but it is "a" solution.

It's rubbish. It fails the simple test of comparing 1' * 1' * 1' with
12" * 12" * 12".

Of course, the job would be even simpler in SI - were you not a Merkin,
you might just about be able to get that right.
 
S

Shaun Furlong

Learn to write intelligible, unambiguous English - after all, the Danes
and the Dutch can do so, so why not you?

What I have learned to do is avoid at least this newsgroup. You people are
a little too unnecessarily abrasive for me. I'm actually running a
business, and just "needed" a little friendly help. Guess I'll find that
elsewhere.
If you had been intelligent enough to read past posts for a while before
posting, you would not have felt a need to write something like that.
The FAQ, and RFC1855 which it cites, would have told you what you need
to know.

Actually I'm a pretty intelligent fellow (most days) - just not familar with
the newsgroup protocol. I certainly wasn't looking for insults. Why on
Earth would you respond in such a way to a perfect stranger just asking for
a little help? (Don't answer - it's just a rhetorical question).

Thanks anyway. Sheesh!
 
J

John G Harris

Of course, the job would be even simpler in SI - were you not a Merkin,
you might just about be able to get that right.

Why don't you spend more time on something useful and less time pursuing
your vendetta against Murkins ? (Note correct spelling of Murkin.)

John
 
V

VK

Request for JS quote

I believe that Usenet doesn't prohibit implicetly any business-related
conversations, as FIDONet does. In such case it was a reasonable
question asked at a reasonable place.

I rely on Dr.Stockton's opinion in this case (while reserving the
rights for my own).
 
R

Randy Webb

VK said the following on 9/20/2006 4:15 PM:
I believe that Usenet doesn't prohibit implicetly any business-related
conversations, as FIDONet does. In such case it was a reasonable
question asked at a reasonable place.

I rely on Dr.Stockton's opinion in this case (while reserving the
rights for my own).

John Stockton's opinion isn't worth the match it would take to burn the
paper you wrote it own. Yours ranks right there with it.
 
R

Randy Webb

John G Harris said the following on 9/20/2006 3:57 PM:
Why don't you spend more time on something useful and less time pursuing
your vendetta against Murkins ? (Note correct spelling of Murkin.)

Because then he wouldn't have anything to do!
 
V

VK

Randy said:
John Stockton's opinion isn't worth the match it would take to burn the
paper you wrote it own. Yours ranks right there with it.

I don't care where my rank is as well as my real opinion about many of
Dr.Stockton's statements can be easily found in Usenet archives.

Yet a question like "I have $100...$1,000 to pay for this" posted at
c.l.j. is a netiquette question I would like to have clarified once and
forever, with all RFC#X, Y, Z and comments from RFC#X1, Y1, Z1 (if
existing)

In *this* aspect I do rely on Dr.Stockton ( with the regular "Quid
custed custodies?" fall back reserved).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top