Site uses |elements| property of an HTMLCollection object

RESOLVED WORKSFORME

Status

()

--
minor
RESOLVED WORKSFORME
15 years ago
7 years ago

People

(Reporter: hts, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

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

(Reporter)

Description

15 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
(http://launch.yahoo.com/registration/default.asp?dest=http%3A//launch.yahoo.com/)
3. Select to set up a personal station
(http://launch.yahoo.com/launchcast/setup.asp)
4. Press Submit button -> Nothing happens

Actual Results:  
Nothing

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

Comment 1

15 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


Håkon:

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
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → Browser-General
Ever confirmed: true
QA Contact: pschwartau → ashishbhatt
Whiteboard: [Test account ID: mozdebug Password: mozilla]
(Reporter)

Comment 2

15 years ago
Answer to questions:

1. Yes: 

   Error: formElements.elements has no properties
   Source File: http://launch.yahoo.com/launchcast/setup.asp

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

Comment 3

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

  Error: formElements.elements has no properties
  Source File: http://launch.yahoo.com/launchcast/setup.asp
  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.");
  }
  else
  {
    var formElements = document.ratingsInterface.elements; <<<----------- HERE

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


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

15 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:

  javascript:alert(document.ratingsInterface.elements.elements);


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

13 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.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.