Emergency help *simple* - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Emergency help *simple*

asamsasams Posts: 3Member
this is an emergency
using notepad i have to do this:


The color of the beacon light atop Boston's John Hancock Building forecasts the weather according to the following rhyme.

Steady blue, clear view.
Flashing blue, clouds due.
Steady red, rain ahead.
Flashing red, snow instead.

Write a JavaScript program that requests a color (blue or red) and a mode (steady or flashing) as input and display the weather forecast.

please help

Comments

  • zibadianzibadian Posts: 6,349Member
    : this is an emergency
    : using notepad i have to do this:
    :
    :
    : The color of the beacon light atop Boston's John Hancock Building forecasts the weather according to the following rhyme.
    :
    : Steady blue, clear view.
    : Flashing blue, clouds due.
    : Steady red, rain ahead.
    : Flashing red, snow instead.
    :
    : Write a JavaScript program that requests a color (blue or red) and a mode (steady or flashing) as input and display the weather forecast.
    :
    : please help
    :
    Place two boxes in a form, and 1
    tag to show the results. Then in the "onsubmit"-event use the following code:
    [code]
    color = form_name.select1_name.selectedIndex;
    flashing = form_name.select2_name.selectedIndex;
    if (color == 0)
    {
    if (flashing == 0)
    label_name.innerHTML = "clear view"
    else
    label_name.innerHTML = "clouds due"
    } else {
    if (flashing == 0)
    label_name.innerHTML = "rain ahead"
    else
    label_name.innerHTML = "snow instead"
    }
    [/code]
    The XXXX_name identify the tags. It might be necessary to change those to correctly identify the tags on your page. For more info see: www.w3schools.com
Sign In or Register to comment.