document.getElementById - Help needed

Discussion in 'JavaScript' started by fiz, Sep 22, 2008.

  1. #1
    Picture: [​IMG]
    http://img221.imageshack.us/img221/6710/a1to2.jpg


    if ( document.getElementById ( "input_field_1" ).value != "" )
    color = document.getElementById ( "input_field_1" ).value;
    else
    color = "#AFD8F8";

    Currently, using the code above. If I click on the first color button, the whole graph changes to the color chosen.

    How do I make it that if I want different colors on different bars assuming the others are using "input_field_#". So if I want "Q2" to be green, "Q3" to be purple and so on, how do i do that?
     
    fiz, Sep 22, 2008 IP