Site uses |elements| property of an HTMLCollection object




16 years ago
8 years ago


(Reporter: hts, Unassigned)


Windows XP

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [Test account ID: mozdebug Password: mozilla], URL)



16 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030507
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030507

When trying to set up a profile with yahoos launchcast service the submit button
which calls javascript:lcHome_submitRatings() fails to execute.
This works fine in IE 6.0.2800.1106.

Also all the categories renders opened and not folded like they do in IE.

Reproducible: Always

Steps to Reproduce:
1. Creat an account with yahoo (or use existing account)
2. Log in to yahoo
3. Select to set up a personal station
4. Press Submit button -> Nothing happens

Actual Results:  

Expected Results:  
Gone to correct page (not sure which since I can't get there)

Comment 1

16 years ago
Reassigning to Browser-General until we can get further information.
If anyone needs a test account at Yahoo, you can use this one:

                      User ID : mozdebug
                      Password: mozilla


1. Are you getting any errors in  Tools > Web Development > JavaScript Console ?
   (be sure to clear it of any previous errors first)

2. Did this site ever work in a previous build of Mozilla?
   That is, is it something that recently stopped working?
Assignee: rogerl → asa
Component: JavaScript Engine → Browser-General
Ever confirmed: true
QA Contact: pschwartau → ashishbhatt
Whiteboard: [Test account ID: mozdebug Password: mozilla]

Comment 2

16 years ago
Answer to questions:

1. Yes: 

   Error: formElements.elements has no properties
   Source File:

2. Have not tried with earlier versions of Mozilla, sorry.

Comment 3

16 years ago
Håkon: thanks. I am also getting the error:

  Error: formElements.elements has no properties
  Source File:
  Line: 564

The line occurs inside the lcHome_submitRatings() function:

function lcHome_submitRatings()
  if (!lcHome_isCheckBoxSelected("policyCheckbox"))
    alert("You must read and agree to the Privacy Policy etc. etc.");
    var formElements = document.ratingsInterface.elements; <<<----------- HERE

    for (var i = 0; i < formElements.length; i++)

The |ratingsInterface| identifier comes from HTML, as follows:

<table width="459" border="0" cellpadding="0" cellspacing="0" bgcolor="#7b7baf">
  <form name="ratingsInterface">

I can't see why that would be failing, unless Mozilla is having trouble
finding a form defined inside a <table> tag. It does seem like invalid
HTML markup to me.

However, Mozilla has NO trouble with this javascript:URL !!!

  javascript:alert(document.ratingsInterface.elements.length); ---> 203

Moz also shows the |formElements| form in View > Page Info > Forms.
So I don't know why it can't resolve |formElements.elements| inside
the lcHome_submitRatings() function.

Will have to look at this further -

Comment 4

16 years ago
Oops, I was mixed up. My javascript:URL is not getting at the error,
which doesn't occur on the line I indicated, but on the next line:

var formElements = document.ratingsInterface.elements;  <<<------ NOT HERE

for (var i = 0; i < formElements.length; i++)
  formObjName = formElements.elements[i].name;          <<<------ BUT HERE!!!

The javascript:URL I should have tried is:


Here is a session from the Mozilla JavaScript Debugger:

js> formElements
[HTMLCollection] [class: HTMLCollection] {0}  <--------- DEFINED, AS IN IE6

js> formElements.length
[integer] 203                                 <--------- DEFINED, AS IN IE6

js> formElements.elements                         
[void] void                                   <--------- UNDEFINED, UNLIKE IE6

js> 'elements' in formElements
[boolean] false

Reassigning to DOM Level 0 for further triage. Is an HTMLCollection object 
supposed to have an |elements| property? I assume not, in which case this
bug should be reassigned to Evangelism; thanks -
Assignee: asa → dom_bugs
Component: Browser-General → DOM Level 0
Summary: Button 'Submit Ratings' calls javascript which fails to execute → Site uses |elements| property of an HTMLCollection object

Comment 5

14 years ago
I do not get the javascript console message in Firefox 1.0.5 on Mac OSX. The
categories are all displayed open, and the site seems to work properly ...
except for the actual PLAYER of course (see bug 121832)
Severity: normal → minor
Assignee: general → nobody
QA Contact: ashshbhatt → general
Page is 404, and no, HTMLCollection.elements shouldn't exist.
Last Resolved: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.