Connecting Tech Pros Worldwide Forums | Help | Site Map

Error: permission denied to get XULElement.selectedIndex

Paul Thompson
Guest
 
Posts: n/a
#1: Jul 23 '05
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?

mscir
Guest
 
Posts: n/a
#2: Jul 23 '05

re: Error: permission denied to get XULElement.selectedIndex


Paul Thompson wrote:[color=blue]
> 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[/color]
<snip>[color=blue]
> 1) How do I interpret this error?
> 2) Is there some error dictionary or something for FireFox?[/color]

- 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




Newbie
 
Join Date: Feb 2006
Posts: 1
#3: Feb 9 '06

re: Error: permission denied to get XULElement.selectedIndex


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.
Newbie
 
Join Date: Mar 2006
Posts: 2
#4: Mar 29 '06

re: Error: permission denied to get XULElement.selectedIndex


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?

Quote:

Originally Posted by Paul Thompson

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?

Newbie
 
Join Date: Mar 2006
Posts: 2
#5: Jul 18 '06

re: Error: permission denied to get XULElement.selectedIndex


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;".
Closed Thread


Similar JavaScript / Ajax / DHTML bytes