By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,818 Members | 2,089 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,818 IT Pros & Developers. It's quick & easy.

Request for JS quote

P: n/a
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/serv...ipfromservices

Thanks!
Sep 18 '06 #1
Share this Question
Share on Google+
13 Replies


P: n/a
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".

;-}

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Sep 18 '06 #2

P: n/a
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. ;-)

"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
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".

;-}

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Sep 19 '06 #3

P: n/a
"Shaun Furlong" <sh***@shaunfurlong.comwrote in message
news:wc******************************@comcast.com. ..
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/serv...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.
Sep 19 '06 #4

P: n/a
Shaun Furlong wrote on 19 sep 2006 in comp.lang.javascript:
>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. ;-)
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.

;-}

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Sep 19 '06 #5

P: n/a
JRS: In article <wc******************************@comcast.com>, dated
Mon, 18 Sep 2006 13:25:38 remote, seen in news:comp.lang.javascript,
Shaun Furlong <sh***@shaunfurlong.composted :
>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.
>1. http://www.cheeseman.com/Density-Calculator.asp
2.
http://www.myyellow.com/dynamic/serv...densitycalcula
tor.jsp?PARENT=yfscjhowtoshipfromservices
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.
--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Sep 19 '06 #6

P: n/a
JRS: In article <LM******************************@comcast.com>, dated
Tue, 19 Sep 2006 11:09:52 remote, seen in news:comp.lang.javascript,
McKirahan <Ne**@McKirahan.composted :
>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.

--
John Stockton, Surrey, UK. *@merlyn.demon.co.uk / ??*********@physics.org
Web <URL:http://www.merlyn.demon.co.uk/- FAQish topics, acronyms, & links.
Correct <= 4-line sig. separator as above, a line precisely "-- " (SoRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "" (SoRFC1036)
Sep 19 '06 #7

P: n/a
"McKirahan" <Ne**@McKirahan.comwrote in message
news:LM******************************@comcast.com. ..
"Shaun Furlong" <sh***@shaunfurlong.comwrote in message
news:wc******************************@comcast.com. ..
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/serv...sitedensitycal
culator.jsp?PARENT=yfscjhowtoshipfromservices

Found an error; try this version.

<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_in = (l_ft*12+l_in)*(w_ft*12+l_in)*(h_ft*12+h_in);
var c_ft = c_in/(12*12*12);
var wait = (o_lb*16+o_oz)/16;
var dens = wait/c_ft;
dens = dens.toString()
if (dens.indexOf(".") >= 0) {
dens = dens.substr(0,dens.indexOf(".")+decs+1);
}
form.Cube.value = c_ft;
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>Result: </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>
Sep 20 '06 #8

P: n/a
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!

"Dr John Stockton" <jr*@merlyn.demon.co.ukwrote in message
news:Q0**************@merlyn.demon.co.uk...
JRS: In article <wc******************************@comcast.com>, dated
Mon, 18 Sep 2006 13:25:38 remote, seen in news:comp.lang.javascript,
Shaun Furlong <sh***@shaunfurlong.composted :
>>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.
>>1. http://www.cheeseman.com/Density-Calculator.asp
2.
http://www.myyellow.com/dynamic/serv...densitycalcula
tor.jsp?PARENT=yfscjhowtoshipfromservices

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.
--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4

<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of
news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates,
sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items,
links.

Sep 20 '06 #9

P: n/a
In article <FP**************@merlyn.demon.co.uk>, Dr John Stockton
<jr*@merlyn.demon.co.ukwrites

<snip>
>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
--
John Harris
Sep 20 '06 #10

P: n/a
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).

Sep 20 '06 #11

P: n/a
VK said the following on 9/20/2006 4:15 PM:
>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).
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.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 20 '06 #12

P: n/a
John G Harris said the following on 9/20/2006 3:57 PM:
In article <FP**************@merlyn.demon.co.uk>, Dr John Stockton
<jr*@merlyn.demon.co.ukwrites

<snip>
>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.)
Because then he wouldn't have anything to do!

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 20 '06 #13

P: n/a
VK

Randy Webb wrote:
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).

Sep 20 '06 #14

This discussion thread is closed

Replies have been disabled for this discussion.