none
Critical Bug with IE7 & IE8 concerning DOM and Dynamic values RRS feed

  • Question

  • I have been working all day going from line to line on my javascript code.  I get "Invalid Property Value" trying to pass some dynamic  DOM values.  Below is what works and what does not. 

    Scenerio:  A user tries to change the color or background color of an <DIV></DIV>

    /* SENDING DYNAMIC COLOR VALUE TO INPUT BOX */ - WORKS
    document.getElementById("inputBox").value=dColor.responseText; 

    /* SENDING STATIC COLOR VALUE TO DIV */ - WORKS
    document.getElementById("divBox").style.backgroundColor='#333333';  

    /* SENDING DYNAMIC BACKGROUND-COLOR VALUE TO DIV */ - FAILS
    document.getElementById("divBox").style.backgroundColor=dColor.responseText;  

    /* SENDING DYNAMIC COLOR VALUE TO DIV */ - FAILS
    document.getElementById("divBox").style.color=dColor.responseText;


    The above code works with all browsers except any Internet Explorer Browsers....





    Lovely Day for a Lonestar.
    Saturday, February 21, 2009 8:13 AM

Answers