need help with source code - FrontPage

J

Justin

Hi, I have an assignment due :
"Create a HTML page where you input a Fahrenheit temperature and the
computer converts and displays as Centigrade. If the temperature is below 0c,
show alert message “It is freezingâ€, if it is over 30c, show “It is hotâ€.
(Use a function)

Conversion formula: C = (F – 32) / 1.8 "
We had a little intro on how to do this but I need help with the source code
- all I have is two text boxes and a submit button - I don't know how to make
the formual work or how to make the alert messages. Please Help!

Thanks,
Justin
 
M

Murray

You need to use some custom javascript or some server-side scripting to do
this. Plain HTML cannot do such a thing.
 
K

Kevin Spencer

I'm going to have to assume that you have been instructed in the things you
need to do for your assignment. Apply the instructions. If you have trouble,
ask your instructor for help. I doubt that the purpose of the assignment was
to learn how to get somebody else to solve your problems for you, or do your
work for you.

If you have a question about how to use FrontPage, this is the place to get
an answer. If you need help doing your homework, this is not the place to
get it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
B

Bob Lehmann

OK, but you'll have to hand over your lunch money for a month.

See ya on the playground,
Bob Lehmann
 
J

Justin

We were instructed how to do this, it was a short half hour session, and no
one is available for help right now, this is a last resort. I'm just trying
to figure out what I've done wrong and need to make this work.

Thanks,
Justin
 
J

Justin

I belive it is supposed to be Java. I really have no idea what I'm doing.
Here's what I have so far (I'm just trying to piece the code together with
what I need to put in, I know it won't work as I have it.)

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>

<p> </p>
<p><b>Fahrenheit to Celsius Converter</b></p>
<p> </p>
<p>Fahrenheit :
<input type="text" name="F" size="20">
<input type="submit" value="Submit" name="B1">
Celsius: <input type="text" name="C" size="20"></p>
<p class="MsoNormal"><span style="color: black">Conversion formula: <b>C =
(F –
32) / 1.8</b></span></p>
<p> </p>
<p> <span class="txt"><font face="courier new, courier, mono">TempCelsius =
(5 / 9) * (TempFahrenheit - 32)</font></span></p>

<p>C=(F-32)/1.8

if (C.value < "O")
{
window.alert("It is freezing.");
();
)
if (C.value > "30")
{
window.alert("It is hot.");
();
)


</body>

</html>

?????
 
J

Justin

OK so I'm not as dumb as I thought. I thought that someone could tell me in a
couple of sentences what's wrong with my code and how to make the function
work. No one is available at school to help me here, so I thought someone
could help me out. I don't know how to implement the function to convert
Fahrenheit to Celsisu and I don't know how to create an alert.

Please help me!

Justin
 
D

David Baxter

Honestly, guys, can you all take a valium or something?

Justin is simply asking a question. For the words "I have an assignment
due", substitute the words "I have a problem I can't figure out". Then,
either answer it or don't answer it -- your choice. And if you choose
not to answer it, just shut the hell up and move on to the next post.
Nobody is twisting your arm to post a reply.

There is far too much of this in this newsgroup.
 
C

Craig Schiller

No one asked for your opinion either, David, but you were pleased to supply
it. As was I.

Craig
 
M

Murray

There's quite a bit missing from what you have there.

For example, the form tags are missing. And, there is nothing that would
actually do the calculation. There is also nothing that would load the
calculated C value into the Celsius: text field. There are no script tags
around the javascript, and it looks like you are comparing the celsius value
to the letter "O" rather than to zero.
 
K

Kevin Spencer

You seem to be in a very small minority here. Perhaps we know something you
do not?

I would give the same answer to my daughter. That is why they are both so
darned smart!

Also, if you think he should be helped, why don't YOU help him?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
C

clintonG

I read through all of the replies. You should know too many people
for some reason treat students like sh!t and forget that the U.S.
schools today are corrupt and do not 'teach' -- they 'assign' and
expect students to learn on their own.

Since it seems it is JavaScript you intend to use (as good a choice
as any for this task) I recommend going to the JavaScript FAQ [1] and
other JavaScript sites that provide free scripts. W3Schools is also an
*excellent* resource that you need to know about. Finally...

Google: "javascript"+"temperature conversion"

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET (e-mail address removed)
URL http://www.metromilwaukee.com/clintongallagher/

[1] http://irt.org/
[2] http://www.w3schools.com/
 
T

Thomas A. Rowe

Justin,

It appears that your instructor didn't provide you with enough information for you to be able to
complete this assignment or the instructor has no clue what is required in order to allow your or
other student the ability to complete this assignment. The instructor provide some JavaScript or
other script examples or instructions prior to handing out this assignment to the you or the class.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
W

Wes

Sounds like the instructor needs instructions in providing instructions.
I guess anyone can be an instructor these days.
 

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

Top