#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    12
    Rep Power
    0

    Change colors in tables with a dropdown box


    is there a way to use java to change the color in an <table> using javascript?

    like:
    function changeColor(sel){
    document.bakfarg.bgColor = "" + sel.options[sel.selectedIndex].value;
    }

    and:
    <select name=bgfarg size=1 onChange="changeColor()">
    <option value="white" selected>$ecstep3{'020'} </option>
    <option value="black">$ecstep3{'021'} </option>
    <option value="blue">$ecstep3{'022'} </option>
    <option value="green">$ecstep3{'023'} </option>
    <option value="skyblue">$ecstep3{'024'} </option>
    <option value="orange">$ecstep3{'025'} </option>
    <option value="purple">$ecstep3{'026'} </option>
    <option value="red">$ecstep3{'027'} </option>
    <option value="silver">$ecstep3{'028'} </option>
    <option value="Yellow">$ecstep3{'029'} </option>
    </select>
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    13
    Rep Power
    0
    this is java not javascript ~

IMN logo majestic logo threadwatch logo seochat tools logo