Closed
Bug 241944
Opened 21 years ago
Closed 21 years ago
JavaScript Error with onload = document.forms[0].FIELDNAME.focus()
Categories
(Firefox :: General, defect)
Tracking
()
VERIFIED
DUPLICATE
of bug 236791
People
(Reporter: jay, Assigned: bugzilla)
References
()
Details
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
*** This bug has been marked as a duplicate of 236791 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•