www.webdeveloper.com
Results 1 to 3 of 3

Thread: DIV visibility set works in Firefox but not IE

  1. #1
    Join Date
    Oct 2006
    Posts
    2

    DIV visibility set works in Firefox but not IE

    I have this Javascript code:
    function pickPaymentType()
    {
    if(document.forms[0].paymentType.value!='P')
    {
    document.getElementById('id').style.visibility='visible';
    document.getElementById('id').style.position='relative';
    }
    else
    {
    document.getElementById('id').style.visibility='hidden';
    document.getElementById('id').style.position='absolute';
    }
    }

    The position and visibility of the DIV section works fine in Firefox. But in IE, the position changes fine when I call this function from a dropdown list but the div is not visible even when it is set as visible.

    Please help! Thank you very much!!

  2. #2
    Join Date
    Oct 2006
    Posts
    11

    similar usage / similar script

    look at the following site using the same browser.
    Mind you I'm not changing the position style attribute, but the visiblity is swapped.

    http://www.bakerstsolutions.com

    rollover the red text "why baker street solutions"

    The JS is pretty easy to read (sloppy I know).

    Let me know if you have problems seeing the rollover in your browser.

    z

  3. #3
    Join Date
    Oct 2006
    Posts
    2
    If I took the statement of setting position out, the visibilty works fine. But for some reason I cannot make them both work correctly in IE.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles