Closed Bug 277508 Opened 20 years ago Closed 20 years ago

rolldown and rollup action not working like IE

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 97506

People

(Reporter: tony, Assigned: bugzilla)

References

()

Details

It seems that

<script language="JavaScript">
 function roller(rollertag, tagtohide) {
  if (document.getElementById(rollertag).src.indexOf("rollout") != -1) { 
  
document.getElementById(rollertag).src="<%=request.getContextPath()%>/images/rollup.gif";
   setstyle(tagtohide, 'display', 'inline');
  } else {
  
document.getElementById(rollertag).src="<%=request.getContextPath()%>/images/rollout.gif";
   setstyle(tagtohide, 'display', 'none');
  }
 }
</script>



in the page like this 
     <logic:notEmpty name="blackboard" property="NZHeraldNewsItems.newsWorld">
     <tr class="news_sub_title">
      <td>
       <table cellspacing="0" cellpadding="0" width="100%">
        <tr class="news_sub_title">
         <td align="center">
          Global News
         </td>
         <td align="right">
          <img id="newsWorldRoller"
src="<%=request.getContextPath()%>/images/rollout.gif" align="center" border="0"
width="20" height="20"
          
onmouseover="document.getElementById('newsWorldRoller').style.cursor='pointer'"
          
onmouseout="document.getElementById('newsWorldRoller').style.cursor='default'"
           onclick="roller('newsWorldRoller', 'newsWorldSection')"/>
         </td>
        </tr>
       </table>
      </td>
     </tr>

     <tr id="newsWorldSection" style="display=none">
      <td>
       <table cellspacing="1" cellpadding="5" width="100%">

        <logic:iterate id="newsWorldItem" name="blackboard"
property="NZHeraldNewsItems.newsWorld">
         <% newsItemCount++; %>
         <tr class="news_label">
          <td id="<%=newsItemCount%>"
               onmouseover="highlight(true,
'<%=newsItemCount%>');highlightMenuOption(true, '<%=newsItemCount%>')"
               onmouseout="highlight(false,
'<%=newsItemCount%>');highlightMenuOption(false, '<%=newsItemCount%>')"
               onclick="popOpen('<bean:write name='newsWorldItem'
property='url'/>')" >
           <bean:write name="newsWorldItem" property="title"/>
           <br/>
          </td>
         </tr>
        </logic:iterate>

       </table>
      </td>
     </tr>
    </logic:notEmpty>


Does NOT act as expected as it does in IE.

Please compare Firefox display actions to those of IE.

Guess is that messing with style="display=none" in a table is not nice.

Thanks.
This happens on the "home" page !
Tony, thanks for reporting this bug, but please read
http://www.mozilla.org/quality/bug-writing-guidelines.html about how to write
helpful bug reports in the future.

We need details: Which version of Mozilla/Firefox where you using?
What steps are needed to reproduce the problem?  What has happened, and
what should have happened?  Also, a working small testcase is always
appreciated (you can attach HTML files to bug reports using the
"Create a New Attachment" link).

No need for this in this bug report though, since I know what the problem is.
In "roller()" you are toggling between "inline"/"none" on a <TR>.
Try using ""/"none" instead.

Also, <tr style="display=none"> should be "display:none", as the
"JavaScript Console" points out ;-)


*** This bug has been marked as a duplicate of 97506 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.