Closed Bug 284339 Opened 20 years ago Closed 20 years ago

Javascript Console error

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: michael.w.moreken, Unassigned)

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Build Identifier: 

Works fine in IE but not Firefox 1.0.1

It chokes on the "for(var r=0; r<cRules.length; r++)" statement below.

Get's reported as a "cRules has no properties" in the Javascript Console

The code is below.

//Temporarily remove styles from draggable items
      if(tempModCl == null)
      {
        var cRules = document.styleSheets[1].rules;
        for(var r=0; r<cRules.length; r++)
        {
          if(cRules.item(r).selectorText == ".epi-indicator" && cRules.item
(r).style.background != "")
          {
            tempStyleIndex = r;
            tempModCl = PageLayout.upModCl;
          }
        }
      }

Reproducible: Always

Actual Results:  
Can not expand or close the entries.
and why should this be a issue with the bugzilla bug database ?
Assignee: justdave → general
Component: Bugzilla: Other b.m.o Issues → DOM: Level 0
Product: mozilla.org → Core
QA Contact: myk → ian
Version: other → Trunk
>        var cRules = document.styleSheets[1].rules;

In the W3C DOM, stylesheets have a "cssRules" property.  They have no "rules"
property.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.