473,406 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Request for JS quote

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
13 1335
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
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
"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
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
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
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
"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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ed Sonneveld | last post by:
Hi, I have hosted my webservice at a hosting company and it has been working fine for 2 years now. The webservice is called by winforms clients over the internet, using the proxy class generated...
1
by: omantawy | last post by:
Hi, I have some legacy ASP web applications that use an unmanaged COM component to connect to a third party application. The third part application has moved to the managed code in the current...
4
by: Michael Kujawa | last post by:
I am using the following to create an SQL statement using the names and values from request.form. The loop goes through each item in request.form The issue comes in having an additional "and" at...
12
by: Mark Rae | last post by:
Hi, See the previous thread Request.Form abuse in this newsgroup... I'm looking for a simple and efficient way to prevent people hijacking the <formtags on my websites and using them to send...
7
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Make CStr for JavaScript on ASP w/ Request.Form and QueryString In ASP, Request.Form and Request.QueryString return objects that do not support "toString", or any JavaScript string...
18
by: Thomas Lunsford | last post by:
I have inherited a set of asp pages that I now need to augment. In order to minimize changes to production code, I would like to make a "call" to an asp page from a new asp page. Existing code is...
4
by: Olivier Matrot | last post by:
Hello, I have a problem with an ASP.NET 2.0 Application. A client request is processed in parrallel by two threads. This ends with the following exception : <Source>System</Source> <StackTrace...
5
by: James R. Davis | last post by:
I am building a set of shared functions and subroutines in a vb file located in my App_Code section of my application. The first three functions went fine and work as expected. But I am now...
5
by: Rory Becker | last post by:
I have had code in my Application_Start which is intended to run once at the start of my application's life. It loads connection information and similar from a known location. However I...
3
by: Joseph Geretz | last post by:
I'm using the Request Filter documentation which can be found here: http://msdn.microsoft.com/en-us/library/system.web.httprequest.filter.aspx In this example, two filters are installed, one...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.