SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    ********* Addict DLG_1's Avatar
    Join Date
    Jun 2000
    Location
    Texas, USA
    Posts
    597
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Tough question!!! (using js to pull dynamic background color data from style sheets.)

    I've got this calendar application in asp. Everytime you click a new date the background color changes and when you submit the asp page takes out the checkboxes from the dates already selected.

    the bottom of the page has 2 text boxes that have a specific background color (iterates through a series of 4) and when the checkbox for a date is selected I need the background color to change according to the color of the text boxes. (in javascript)

    so how would I pull the background color from the text boxes in order to know what color to change the checkbox (<td>) back ground color?

    did i make sense?

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    var myColor = document.forms[0].elements['inputName'].style.backgroundColor;
    document.getElementByID(tdID).style.backgroundColor = myColor;
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev





Bookmarks

Posting Permissions

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