Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: im clueless!

  1. #1
    Regular Coder
    Join Date
    Jun 2003
    Location
    hawaii.washington state
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    im clueless!

    well, i know that i should do the coding myself. But see ive done it and it dont work and i simply dont understand javascript but i have to do something for JS class, so please if anyone would help me it would be greatly appreciated.. i have to create a conversion table using C=(F-32)/1.8 I have to start with a farenheit of 20 degrees and end with a temperature of 120 degrees using 3 degrees increments. now there should be a tble with 2 columns, one for farenheit and one for celcius. i know that there has to be a loop and a while function in there and document.write. im just fustrated already...please somebody help me im not asking you to fully write it out (although that would be the bomb) but it dosent work that way, so if somebody is kind enough to talk to me and reallly seriously help me understand and help me write this code i will love you for life. aim:e3ccentric aloha

  • #2
    WA
    WA is offline
    Administrator
    Join Date
    Mar 2002
    Posts
    2,596
    Thanks
    2
    Thanked 19 Times in 18 Posts
    Hi:
    Firstly, please read our posting guidelines regarding using a descriptive subject for your thread: http://www.codingforums.com/postguide.htm

    Regarding your question, it would greatly help if you post what you have so far, so several reasons, one of them to show you've actually made an attempt on the project yourself. We can't help people write their assignments- that is cheating.
    - George
    - JavaScript Kit- JavaScript tutorials and 400+ scripts!
    - JavaScript Reference- JavaScript reference you can relate to.

  • #3
    Regular Coder
    Join Date
    Jun 2003
    Location
    hawaii.washington state
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    uhh..

    i wasnt asking someone to do my assignment first of all, second of all i was ASKING for help on understanding JS and anyone that would be able to seriously help me with this. again i wasnt asking someone to do my homework thank you very much..

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Converters

    Hi there.

    I took the liberty of searching on google for you.

    Here are some links to actual converters for you. take a look, see what they do and how.

    http://www.albireo.ch/temperatureconverter

    http://www.temperatureworld.com/tempcon.htm

    http://www.allmeasures.com/temperature.html

    I hope this helps you. there where loads more results but I liked these. Good luck with the assignment.
    Therapy is expensive, popping bubble wrap is cheap, you choose.

  • #5
    Regular Coder
    Join Date
    Jun 2003
    Location
    hawaii.washington state
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ;o)

    thanks i will check those out right now, and i think i wont be using this service anymore, they think im asking someone to do my homework which im not, so im not even going to attempt to post the codde ive done with this project take care and god bless
    alojahz

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    Flint, Michigan, USA
    Posts
    629
    Thanks
    1
    Thanked 20 Times in 20 Posts
    First an EXAMPLE (not your homework) script:

    &nbsp;&nbsp;01:&nbsp;Out&nbsp;='<table&nbsp;border="1"&nbsp;cellspacing="2"&nbsp;cellpadding="2">\n' ;
    &nbsp;&nbsp;02:&nbsp;&nbsp;&nbsp;document.write(Out);
    &nbsp;&nbsp;03:&nbsp;Out&nbsp;='&nbsp;&nbsp;<thead>\n';
    &nbsp;&nbsp;04:&nbsp;Out+='&nbsp;&nbsp;&nbsp;&nbsp;<tr>\n';
    &nbsp;&nbsp;05:&nbsp;Out+='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<th&nbsp;bgcolor="#ffffcc">Column&nbs p;1<\/th>\n';
    &nbsp;&nbsp;06:&nbsp;Out+='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<th&nbsp;bgcolor="#ffffcc">Column&nbs p;2<\/th>\n';
    &nbsp;&nbsp;07:&nbsp;Out+='&nbsp;&nbsp;&nbsp;&nbsp;<\/tr>\n';
    &nbsp;&nbsp;08:&nbsp;Out+='&nbsp;&nbsp;<\/thead>\n';
    &nbsp;&nbsp;09:&nbsp;&nbsp;&nbsp;document.write(Out);
    &nbsp;&nbsp;10:&nbsp;Out&nbsp;='&nbsp;&nbsp;<tbody>\n';
    &nbsp;&nbsp;11:&nbsp;&nbsp;&nbsp;document.write(Out);
    &nbsp;&nbsp;12:&nbsp;for&nbsp;(ix1=4;&nbsp;ix1<100;&nbsp;ix1+=7)&nbsp;{
    &nbsp;&nbsp;13:&nbsp;&nbsp;&nbsp;ix2=(ix1+10)/3;
    &nbsp;&nbsp;14:&nbsp;&nbsp;&nbsp;Out&nbsp;='&nbsp;&nbsp;&nbsp;&nbsp;<tr>\n';
    &nbsp;&nbsp;15:&nbsp;&nbsp;&nbsp;Out+='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td&nbsp;bgcolor="aqua"&n bsp;align="right">'+ix1+'<\/td>\n';
    &nbsp;&nbsp;16:&nbsp;&nbsp;&nbsp;Out+='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td&nbsp;bgcolor="aqua"&n bsp;align="right">'+ix2+'<\/td>\n';
    &nbsp;&nbsp;17:&nbsp;&nbsp;&nbsp;Out+='&nbsp;&nbsp;&nbsp;&nbsp;<\/tr>\n';
    &nbsp;&nbsp;18:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.write(Out);
    &nbsp;&nbsp;19:&nbsp;}
    &nbsp;&nbsp;20:&nbsp;Out&nbsp;='&nbsp;&nbsp;<\/tbody>\n';
    &nbsp;&nbsp;21:&nbsp;Out+='<\/table>\n';
    &nbsp;&nbsp;22:&nbsp;&nbsp;&nbsp;document.write(Out);

    Then a line-by-line explaination of things I think might be significant:

    &nbsp;01: 'Out' is a variable that I'm using to build an output set of lines. It now contains the main 'table' line. The backslash-n near the end of the line causes a new-line in the view-source listing and makes it look nice.
    &nbsp;02: This puts 'Out' to the web page.
    &nbsp;03-09: Build the table header and put it on the page. The indents and backslah-n's are there to make the view-source look nice.
    &nbsp;10-11: Put out the table-body line.
    &nbsp;12: Begin a 'for' loop that starts with ix1=4, continues as long as ix1 is less than 100, and increments ix1 by 7 each time. You could also use a 'while' loop. Obviously, you'll have to change parameters to match your assignment.
    &nbsp;13: Calculates a second value based on the loop parameter.
    &nbsp;14-18: Build a row of the table. Notice the 'ix1' and 'ix2' items that are NOT within the quoted strings; these pick up the values.
    &nbsp;20-22: Finish the table.
    Last edited by jalarie; 07-16-2003 at 05:45 PM.

  • #7
    Regular Coder
    Join Date
    Dec 2002
    Location
    a bit west of pittsburgh
    Posts
    236
    Thanks
    1
    Thanked 0 Times in 0 Posts
    who is they? WA? well. he's an admin, its his job to correct the people with posts<=15.

    don't leave the forums. they are a great place to learn and get HELP.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •