User Profile

Collapse

Profile Sidebar

Collapse
IndyNS
IndyNS
Last Activity: Jun 1 '12, 01:59 AM
Joined: May 2 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Code:
    <style>
    option.Avaliable {background-color:green} 
    option.Busy {background-color:red}
    </style>
    then in the body
    Code:
    <option value="0" class="Avaliable">Avaliable</option>
    <option value="1" class="Busy">Busy</option>
    See more | Go to post

    Leave a comment:


  • Changing background color of the options in a drop down menu using JS

    Here is what I am trying to do. I am using a JS button to create a new row in a table. In the new row I have two text boxes and a drop down list. I am wanting to set the background color of each of my options in the drop list.

    Here is the section of the JS code that I create the drop down list.
    Code:
    //cell 1
    var cell1 = row.insertCell(1);
    var el = document.createElement("select");
    el.name = 'Status[]' //
    ...
    See more | Go to post
    Last edited by Dormilich; May 30 '12, 06:13 AM. Reason: Please use [CODE] [/CODE] tags when posting code.

  • IndyNS
    replied to addRowToTable
    Awesome I will give it a try! Thank you for helping the newbie!
    See more | Go to post

    Leave a comment:


  • IndyNS
    replied to addRowToTable
    Basically I want to have multiple tables each with their own add button(which adds a row with the 2 text boxes and drop down) that only adds to that specific table.
    See more | Go to post

    Leave a comment:


  • IndyNS
    started a topic addRowToTable

    addRowToTable

    I am trying to create a dynamic form on my webpage. What I want to do is repeat this process multiple times on the same page. I know I have to have unique id's but I am not for sure how to set them.

    Code:
    // JavaScript Document 
    function addRowToTable(){
      var tbl = document.getElementById('Division');
      var lastRow = tbl.rows.length;
      // if there's no header row in the table, then iteration = lastRow + 1
      var
    ...
    See more | Go to post
    Last edited by acoder; May 3 '12, 02:19 PM. Reason: Added [code] tags
No activity results to display
Show More
Working...