Results 1 to 2 of 2

Thread: IE DOM reference - No fun at all

  1. #1
    Join Date
    Feb 2006
    Posts
    3

    Unhappy IE DOM reference - No fun at all

    I have a dropdown menu (SELECT) in my web form named 'CloseAcct'. The dropdown menu is created with PHP as a hiden SELECT field. The field name of the hiden SELECT field is 'department'. User can select a department name from a list of departments by clicking that SELECT field.
    For Firefox and Netscape, I use DOM reference document.forms.CloseAcct.department.value to get the name of the department user selected easily and successfully. However, that DOM reference does not work for IE. I tried the following posssible DOM references supported by IE, but none of them works:
    document.getElementById("department").value
    document.all["department"]
    document.getElementByTagName("select")

    What is the right DOM reference in IE that is equivalent to document.forms.CloseAcct.department.value? I got really frustrated with the confusing DOM in IE. Hope someone here could help. Thank you in advance.

  2. #2
    Join Date
    Jun 2004
    Posts
    173
    Are you using display:none to hide your select?

Similar Threads

  1. Help! Any recommend Javascript Reference Website
    By chickenwing in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 30 Jun 2006, 11:04 PM

Posting Permissions

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