I found 155 topics on this when searching in Google. Some dating back as far as 0.9.2. I am suprised that this bug would still be showing up in 1.0.6.
This error always occurs when setting the focus to a <select> element from an <input> element of type "text", regardless of whether the input element has anything in it or not.
Here is the full 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://localhost/test_script.js :: switchOnKeyPress :: line 386"
data: no
]
Source File: http://localhost/test_script.js
Line: 386
Permission denied to get property XULElement.selectedIndex
-
- Posts: 97
- Joined: June 20th, 2004, 7:45 am
- Location: US
-
- Posts: 4941
- Joined: July 31st, 2003, 1:26 pm
-
- Posts: 97
- Joined: June 20th, 2004, 7:45 am
- Location: US
-
- Posts: 97
- Joined: June 20th, 2004, 7:45 am
- Location: US
Unarmed wrote:The workaround of disabling autocomplete on the form element still works. mconner set blocking-firefox2 on it, so hopefully it’ll get some attention before 2.0 goes final.
How can autocomplete be disabled on an element-per-element basis? Is there a form element attribute to prevent Firefox from doing this?
-
- Posts: 5
- Joined: September 30th, 2005, 12:19 pm
The beauty of Javascript is the fact that there is more than one way to get at what you need. I was running into this exact issue for something I was working on. I solved it by taking another approach. This may not work for everything, but in my case it was just the ticket.
document.formname.formfield.options[value].selected = true
document.formname.formfield.options[value].selected = true