views:

17

answers:

1

So I have this in my RoR app, it works in FF, Chrome, and Safari... but not in IE7...
neither li works with or without javascript.
Why does this happen, and how do I fix it?

<li class="decline" name="javascript_required" style="display: none;">
    <a href="/view/close/1?status=3" rel="facebox">Decline</a></li>
        <noscript>
            <li class="decline">
                <a href="/view/close/1?javascript_disabled=true&amp;status=3" id="decline-this-nojs" rel="facebox">Decline</a></li>

        </noscript>

Then I have this at the bottom

<script type="text/javascript">
hidden_links = document.getElementsByName("javascript_required");
    for (i = 0; i < hidden_links.length; i++) {
        hidden_links[i].style.display = "block";
    }
</script>
A: 

Apparently, IE7 doesn't support getElementsByName.

Since I only had 3 things I needed to mess with, I used getElementById...

However.. with getElementById being used all the time would get nasty if there are a lot of things needing to be shown / hidden for whatever reason

DerNalia