www.webdeveloper.com
Results 1 to 9 of 9

Thread: how long does it take post to show up on forum?

  1. #1
    Join Date
    Mar 2012
    Posts
    8

    how long does it take post to show up on forum?

    i started a new thread on forum for some help that i needed on a school assignment and was wondering how long it takes for the thread to post, i just registered today for the site?

  2. #2
    Join Date
    Mar 2012
    Posts
    8
    ok so this one posted immediately....what happened to the book i wrote earlier....it took me along time to create that post!

  3. #3
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,364
    Are you sure it was submitted to THIS forum?

  4. #4
    Join Date
    Mar 2012
    Posts
    8
    I am new to the world of programming. I currently in my sophomore year of a software engineering bachelors program. This semester was suppose to be a introductory class to JavaScript. I'm a night-class student full-time age 34 making a career change. Not stupid in any means (3.87GPA) i learn when taught properly. Well needless to say i have a first time teacher who never taught before. Excellent webdeveloper, not so good of a teacher. Just cant make that connection with students. whole class is *****ing they dont know what hes talking about. Doesnt know how to teach javascript basics. skips a lot of the coding in the middle. I have an A in the class along with all of my other classmates and i haven't learned a lick. Which SUCKS cuz javascript is an important language to know a little about when you jump out into the workforce.

    this is the XHTML code that was given to work with:

    /*<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Temperature Converter</title>
    <link rel="stylesheet" type="text/css" href="default.css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="convert_temp.js"></script>
    </head>
    <body>
    <div id="content">
    <h1>Convert temperature</h1>

    <input type="radio" name="conversion_type" id="to_celcius" checked="checked" />From Fahrenheit to Celcius<br />
    <input type="radio" name="conversion_type" id="to_fahrenheit" />From Celcius to Fahrenheit<br />
    <br />

    <label>Degrees Fahrenheit:</label>
    <input type="text" id="degrees_fahrenheit" class="disabled" /><br />
    <label>Degrees Celcius:</label>
    <input type="text" id="degrees_celcius" disabled="disabled" class="disabled"/><br />
    <br />

    <input type="button" id="convert" value="Convert" /><br />
    <br />
    </div>
    </body>
    </html>*/

    Not the issue because this was given, now the assignment is to:
    operation

    1....If the user selects one of the radio buttons, this application disables the text box that's used to diplay the results of the calculation, it enables the text box that's used to get the data from the user, and it removes any data from both text boxes

    2....This application displays the concerted temperature in the disabled text box when the user clicks on the convert button

    Functional specs
    ---formula for converting fahr to cels... celsius = (fahr - 32) * 5/9
    ---formula for converting cels to fahr.... fahr = cels * 9/5 + 32
    ---this application should accept decimal entries like 77.5, but it should round the result of the conversion to the nearest int value
    ---this application should validate data to make sure that the user enters a valid number for the conversion

    Additional coding requirements

    ---To demonstrate you know how to write and use a function (LOLOLOL) that returns a value in javascript, use a separate function for at least one of the temperature conversions

    --to demonstrate knowledge of techniques related to form validation, use a regular expression to ensure the input values are valid (dont forget about negative numbers, but you can ignore octal and hexadecimal temperatures

    That is the assignment!

    Ill show you what i've done in the on the .js page...Its doing something but nothing right (lolol)....its keeping my degrees celsius text box always in read only, the conversion in the math seems screwed up, everytime i hit convert button the value inside the celsius box which is in read only stays there and i"m not gonna type evrything that is wrong here you can probably find what im doing completely wrong just from my code so here it is.......its incomplete just running into trouble and figuring out hoiw to make this thing run the way its suppose too

    /*var $ = function (id) {
    return document.getElementById(id);
    }

    var calculateCelcius_click = function()
    {
    if ($("to_celcius").checked)// checks to see if fahrenheit to celcius button is clicked
    {
    var fahrenheit = parseFloat($("degrees_fahrenheit").value);//var to take text entered into degrees fahrenheit and make it number value
    $("degrees_celcius").diabled = true;
    if (isNaN(fahrenheit))//error check to see if user input is a number
    {
    alert("Invalid Entry, please neter a valid number")// error message to display if anything other than numbers are entered
    }
    else if (!isNaN(fahrenheit))// if numbver is valid do the following calculations
    {
    var celsius = (fahrenheit - 32) * 5/9;
    celsius = parseInt(celsius);
    $("degrees_celcius").value = celsius;
    }
    }
    }

    var calculateFahrenheit_click = function()
    {
    if ($("to_fahrenheit").checked)// checks to see if celcius to fahrenheit button is clicked
    {
    var celcius = parseFloat($("degrees_celcius").value);//var to take text entered into degrees fahrenheit and make it number value
    $("degrees_fahrenheit").diabled = true;
    if (isNaN(celcius))//error check to see if user input is a number
    {
    alert("Invalid Entry, please neter a valid number")// error message to display if anything other than numbers are entered
    }
    else if (!isNaN(celcius))// if numbver is valid do the following calculations
    {
    var fahrenheit = celcius * 9/5 + 32;
    fahrenheit = parseInt(fahrenheit);
    $("degrees_fahrenheit").value = fahrenheit;
    }
    }
    }

    window.onload = function ()
    {
    $("convert").onclick = calculateCelcius_click;
    $("convert").onclick = calculateFahrenheit_click;
    }

    */

  5. #5
    Join Date
    Mar 2012
    Posts
    8
    thank god i didnt leave this site in awhile.....i just back buttoned my browser till i found everything i typed and copied and pasted on this link....whewww

  6. #6
    Join Date
    Mar 2012
    Posts
    8
    when i poted it originally it said i wouldnt see post until a mod approved it...but it never showed up

  7. #7
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,364

    Lightbulb

    I don't use JQuery, so I'll not be of much help there.

    However, if your external file is as you specify:
    Code:
    /*var $ = function (id) {
    .....
    
    */
    I'm a bit suprised it does anything at all.
    Note the characters in red: They are comment indicators and all code between the /* and */
    is treated as one big comment. REMOVE THEM!




    Note also, it is a good idea to enclose your script postings between [ code] and [ /code] tags (without the spaces)
    to make it easier to view, copy, test and comment about your attempts.

  8. #8
    Join Date
    Mar 2012
    Posts
    8
    i put the comment markers on when o posted the code cuz i didnt know how the code intercted with the site but in notepad++ which im using to write it the comment markers are not there and it isnt running.....

    i didnt know about the the code tags....i will edit the post....sorry im pretty much as green as it comes...when it comes to coding....but im a quick learner.......im a heavy equipment operator who at the age of 34 is making a career change...so go go figure....lolol

  9. #9
    Join Date
    Nov 2011
    Location
    Nigeria
    Posts
    28
    Code:
    window.onload =
    function ()
    {
    $("convert").onclick =
    calculateCelcius_click;
    $("convert").onclick =
    calculateFahrenheit_
    click;
    }
    BE SURE NOT TO GIVE 2 ELEMENTS THESAME ID. In your html code.
    Can't highlight it but note the ("convert")

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles