469,572 Members | 1,718 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,572 developers. It's quick & easy.

Error: permission denied to get XULElement.selectedIndex

I am getting an odd, inscrutable error in Mozilla Firefox. When I use
an array to shift focus to an element, I get the 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.biostat.wustl.edu/~consul...va/mainjava.js :: nclkH ::
line 292" data: no]
Source File: http://www.biostat.wustl.edu/~consul...va/mainjava.js
Line: 292

However, the focus() works fine.

1) How do I interpret this error?

2) Is there some error dictionary or something for FireFox?
Jul 23 '05 #1
4 9414
Paul Thompson wrote:
I am getting an odd, inscrutable error in Mozilla Firefox. When I use
an array to shift focus to an element, I get the error <snip> 1) How do I interpret this error?
2) Is there some error dictionary or something for FireFox?


- A quick look shows that you're missing a lot of semicolons.
- You have multiple variable declarations for the same variable in this
function:

function chkV(f,fnm,chkval) {
var retval=0;
...
var retval=1;
-IN the functions CSV, CSVx, CVBx, CSVval, fixblank, clkH, CBV, showall
I'd recommend using "var" before the loop counter, e.g.

for (i=0; i < zmaxv; i++) .... for (var i=0; i<zmaxv; i++}
-In the functions CBV and CVBx, in the loops, why not return as soon as
a selected button's value is found. And maybe eliminate retv using
something like:

http://www.breakingpar.com/bkp/home....256AFB0013E5E9

function getSelectedRadio(buttonGroup) {
//returns the array number of the selected
//radio button or -1 if no button is selected
for (var i=0; i<buttonGroup.length; i++) {
if (buttonGroup[i].checked) {
return i;
}
}
// if we get to this point, no radio button is selected
return -1;
}

-The FAQ for this group has Left Trim and Right Trim functions, if you
want to take a look at them:
function LTrim(str) {
for (var k=0; k<str.length && str.charAt(k)<=" " ; k++) ;
return str.substring(k,str.length);
}
function RTrim(str) {
for (var j=str.length-1; j&gt;=0 && str.charAt(j)<=" " ; j--) ;
return str.substring(0,j+1);
}
function Trim(str) {
return LTrim(RTrim(str));
}

I don't know if these will fix your problem, but I think they're
generally good advice. If they don't fix the problem, how about posting
the url of the page that uses that script?

Good Luck,
Mike


Jul 23 '05 #2
I struggled with this error for half a day ....and finally found a simple fix.

Error: [Exception... "'Permission denied to get property XULElement..."

This is apparently a bug in FireFox's AutoComplete code. I found a reference to this in Bugzilla, and was able to avoid it like this:

<input type="text" autocomplete="off" name="fname"> etc.

The error message went away and all is well. It did not seem to have any problems in IE before or after adding the autocomplete parameter.

'hope this helps.
Feb 9 '06 #3
I have the same problem... but the cursor is invisible. I know the focus is there because when I type, characters show up in the input field. I tried the autocomplete="off" (Thanks rickeyFitts!) and that got rid of the errors, but cursor is still disappearing. Does anyone have any ideas?

I am getting an odd, inscrutable error in Mozilla Firefox. When I use
an array to shift focus to an element, I get the 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.biostat.wustl.edu/~consul...va/mainjava.js :: nclkH ::
line 292" data: no]
Source File: http://www.biostat.wustl.edu/~consul...va/mainjava.js
Line: 292

However, the focus() works fine.

1) How do I interpret this error?

2) Is there some error dictionary or something for FireFox?
Mar 29 '06 #4
The missing cursor in Firefox is caused because the input is nested within a <div>, I am not sure why, to fix it add the following attribute to the div tag: style="overflow:auto;".
Jul 18 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Miguel Cañedo | last post: by
4 posts views Thread by Stefan Mueller | last post: by
2 posts views Thread by Taishi | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.