If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

JavaScript Error with onload = document.forms[0].FIELDNAME.focus()

VERIFIED DUPLICATE of bug 236791

Status

()

Firefox
General
VERIFIED DUPLICATE of bug 236791
14 years ago
13 years ago

People

(Reporter: Jay Solomon, Assigned: Blake Ross)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8

In the page at http://jaysolomon.net/ssc/contact/index.html you will see that
when you first get to the page it will set focus on the first form field using
setTimeout("document.forms[0].fieldname.focus()",10), but if you click reload in
the browser i get the following javascript error:

Error: [Exception... "'Permission denied to get property
XULElement.selectedIndex' when calling method:
[nsIAutoCompletePopup::selectedIndex]"  nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)"  location: "JS frame ::
http://www.jaysolomon.net/ssc/scripts/contact.js :: <TOP_LEVEL> :: line 3" 
data: no]
Source File: http://www.jaysolomon.net/ssc/scripts/contact.js
Line: 3

I only get this error when i click reload. This happens on every "reload"

Reproducible: Always
Steps to Reproduce:
1. Open The URI
2. Let it finish loading
3. Click Reload / Refresh in the browser toolbar

Actual Results:  
The form field does not get focus and you get the following JS error:
Error: [Exception... "'Permission denied to get property
XULElement.selectedIndex' when calling method:
[nsIAutoCompletePopup::selectedIndex]"  nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)"  location: "JS frame ::
http://www.jaysolomon.net/ssc/scripts/contact.js :: <TOP_LEVEL> :: line 3" 
data: no]
Source File: http://www.jaysolomon.net/ssc/scripts/contact.js
Line: 3

Expected Results:  
Set focus on the first field

Comment 1

14 years ago

*** This bug has been marked as a duplicate of 236791 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
v.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.