GetElementByID.innerHTML in IE and FF

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sm3128
    New Member
    • May 2010
    • 1

    #1

    GetElementByID.innerHTML in IE and FF

    Hi,

    I have code in jsp like this

    Code:
    <div id="ruleActionOptions" style="visiblity:hidden;display:none;">
    <option value="A" selected>Approve</option>
    <option value="L">Final Approver</option>
    <option value="Z">Bypass</option>
    </div>
    this code document.getEle mentById("ruleA ctionOptions"). innerHTML;

    In IE :

    give me

    Code:
    <option value="A" selected>Approve</option>
    <option value="L">Final Approver</option>
    <option value="Z">Bypass</option>
    In FireFox:

    It gives

    Approve
    Final Approver
    Bypass

    I want same result In firefox.

    can anybody please suggest some thing?

    Thanks in Advance
    With Regards
    Last edited by acoder; May 6 '10, 10:50 AM. Reason: Added [code] tags
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Options need to be within a select element. Change the div into a <select>

    Comment

    Working...