Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > field.focus() in Firefox 0.8 >

Reply
Thread Tools

field.focus() in Firefox 0.8 >

 
 
Geoff
Guest
Posts: n/a
 
      06-11-2004
When trying to focus a field in Firefox, I get the following 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 ::
file:///C:/Documents%20and%20Settings/Edd/Desktop/test.html :: valText
:: line 24" data: no]
Source File: file:///C:/Documents%20and%20Settings/Edd/Desktop/test.html
Line: 24

Anyone have any ideas as to why this is happening?

Thanks
 
Reply With Quote
 
 
 
 
Grant Wagner
Guest
Posts: n/a
 
      06-11-2004
Geoff wrote:

> When trying to focus a field in Firefox, I get the following 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 ::
> file:///C:/Documents%20and%20Settings/Edd/Desktop/test.html :: valText
> :: line 24" data: no]
> Source File: file:///C:/Documents%20and%20Settings/Edd/Desktop/test.html
> Line: 24
>
> Anyone have any ideas as to why this is happening?
>
> Thanks


It's happening because you are attempting to do something that is causing an
NS_ERROR_XPC_JS_THREW_STRING error. Without seeing your code, it's
impossible to know what that is. Most likely you are doing nothing wrong,
I'll explain.

I've noticed a similar problem when calling <body onload="window.focus();">
with some windows and not others. And now, testing a window I was opening
that I thought was causing the error, I'm no longer seeing the error, so it
could be caused by some combination of tab variations or installed
extensions in Firefox.

I'm treating it as a bug in Firefox and ignoring the problem.

If you want a more thorough explanation and want to investigate further, I'd
suggest you install Mozilla 1.6 and test, install Mozilla 1.7RC3 and test,
install Mozilla 1.8a and test. Also test on a fresh install of Firefox (no
extensions, no customizations). Determine in exactly what versions of
Mozilla the problem happens. For example, if it happens in 1.6, but not
1.7RC3, it was a bug they fixed, and you won't see the fix in Firefox until
version 0.9 (RC available and 75% of the size of 0.8 ... yay!). If the
problem happens in Firefox with Tabbrowser Extensions installed, but doesn't
in Firefox with Tabbrowser Extensions not installed, the problem is
Tabbrowser Extensions, etc. If the problem is evident in Mozilla builds up
to 1.8a, then check bugzilla to see if the problem is described there, and
if so, what the status of the bug is.

Unfortunately this sort of thing presents all sorts of problems. I've still
got code where I attach null events to form elements in HTML code because at
one point Mozilla wouldn't bind dynamically assigned event handlers unless
you did that. In other words:

<input type="text" name="myInput" ... onkeypress="">
<script type="text/javascript">
document.forms['myForm'].elements['myInput'].onkeypress = someHandler;
</script>

Just didn't work unless you specifically included [onkeypress=""] in the
HTML. I'm betting I'll never be able to remove that useless HTML attribute
because someone somewhere might be using a version of Mozilla that doesn't
work without it.

--
| Grant Wagner <(E-Mail Removed)>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html


 
Reply With Quote
 
 
 
 
PatD
Guest
Posts: n/a
 
      06-11-2004
In a land long ago, in a time far away
http://www.velocityreviews.com/forums/(E-Mail Removed) (Geoff) wrote:

>When trying to focus a field in Firefox, I get the following 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 ::
>file:///C:/Documents%20and%20Settings/Edd/Desktop/test.html :: valText
>:: line 24" data: no]
>Source File: file:///C:/Documents%20and%20Settings/Edd/Desktop/test.html
>Line: 24
>
>Anyone have any ideas as to why this is happening?


It's a feature:
http://bugzilla.mozilla.org/show_bug.cgi?id=236791



 
Reply With Quote
 
Paul THompson
Guest
Posts: n/a
 
      06-22-2004
Grant Wagner <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Geoff wrote:
>
> > When trying to focus a field in Firefox, I get the following 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 ::
> > file:///C:/Documents%20and%20Settings/Edd/Desktop/test.html :: valText
> > :: line 24" data: no]
> > Source File: file:///C:/Documents%20and%20Settings/Edd/Desktop/test.html
> > Line: 24
> >
> > Anyone have any ideas as to why this is happening?
> >
> > Thanks

>
> It's happening because you are attempting to do something that is causing an
> NS_ERROR_XPC_JS_THREW_STRING error. Without seeing your code, it's
> impossible to know what that is. Most likely you are doing nothing wrong,
> I'll explain.
>
> I've noticed a similar problem when calling <body onload="window.focus();">
> with some windows and not others. And now, testing a window I was opening
> that I thought was causing the error, I'm no longer seeing the error, so it
> could be caused by some combination of tab variations or installed
> extensions in Firefox.
>
> I'm treating it as a bug in Firefox and ignoring the problem.
>
> If you want a more thorough explanation and want to investigate further, I'd
> suggest you install Mozilla 1.6 and test,


I get that error too. I got up Mozilla 1.6, and do not find the error there.

When does Firefox .9 come out?

install Mozilla 1.7RC3 and test,
> install Mozilla 1.8a and test. Also test on a fresh install of Firefox (no
> extensions, no customizations). Determine in exactly what versions of
> Mozilla the problem happens. For example, if it happens in 1.6, but not
> 1.7RC3, it was a bug they fixed, and you won't see the fix in Firefox until
> version 0.9 (RC available and 75% of the size of 0.8 ... yay!). If the
> problem happens in Firefox with Tabbrowser Extensions installed, but doesn't
> in Firefox with Tabbrowser Extensions not installed, the problem is
> Tabbrowser Extensions, etc. If the problem is evident in Mozilla builds up
> to 1.8a, then check bugzilla to see if the problem is described there, and
> if so, what the status of the bug is.
>
> Unfortunately this sort of thing presents all sorts of problems. I've still
> got code where I attach null events to form elements in HTML code because at
> one point Mozilla wouldn't bind dynamically assigned event handlers unless
> you did that. In other words:
>
> <input type="text" name="myInput" ... onkeypress="">
> <script type="text/javascript">
> document.forms['myForm'].elements['myInput'].onkeypress = someHandler;
> </script>
>
> Just didn't work unless you specifically included [onkeypress=""] in the
> HTML. I'm betting I'll never be able to remove that useless HTML attribute
> because someone somewhere might be using a version of Mozilla that doesn't
> work without it.
>
> --
> | Grant Wagner <(E-Mail Removed)>
>
> * Client-side Javascript and Netscape 4 DOM Reference available at:
> *
> http://devedge.netscape.com/library/...ce/frames.html
>
> * Internet Explorer DOM Reference available at:
> *
> http://msdn.microsoft.com/workshop/a...ence_entry.asp
>
> * Netscape 6/7 DOM Reference available at:
> * http://www.mozilla.org/docs/dom/domref/
> * Tips for upgrading JavaScript for Netscape 7 / Mozilla
> * http://www.mozilla.org/docs/web-deve...upgrade_2.html

 
Reply With Quote
 
Grant Wagner
Guest
Posts: n/a
 
      06-22-2004
Paul THompson wrote:

> Grant Wagner <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
>
> > I've noticed a similar problem when calling <body onload="window.focus();">
> > with some windows and not others. And now, testing a window I was opening
> > that I thought was causing the error, I'm no longer seeing the error, so it
> > could be caused by some combination of tab variations or installed
> > extensions in Firefox.
> >
> > I'm treating it as a bug in Firefox and ignoring the problem.
> >
> > If you want a more thorough explanation and want to investigate further, I'd
> > suggest you install Mozilla 1.6 and test,

>
> I get that error too. I got up Mozilla 1.6, and do not find the error there.
>
> When does Firefox .9 come out?


It's out now: <url: http://www.mozilla.org/products/firefox/ />

As is Mozilla 1.7: <url: http://www.mozilla.org/ />

But please note, some problems may persist and you may be unable to do anything about them. For example:

<body onload="alert('hi');">

causes the following errors in Firefox 0.9:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)
[nsIDOMWindowInternal.focus]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame ::
chrome://tabextensions/content/tabextensions.xml :: setFocus :: line 1074" data: no]

yes, I'm aware the errors is coming from Tabbrowser Extensions but I'm not going to give it up because it
produces an uncaught exception that does no harm.

--
| Grant Wagner <(E-Mail Removed)>

* Client-side Javascript and Netscape 4 DOM Reference available at:
* http://devedge.netscape.com/library/...ce/frames.html
* Internet Explorer DOM Reference available at:
* http://msdn.microsoft.com/workshop/a...ence_entry.asp
* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html


 
Reply With Quote
 
Paul Thompson
Guest
Posts: n/a
 
      06-22-2004
Paul THompson wrote:
> Grant Wagner <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
>
>>Geoff wrote:
>>
>>
>>>When trying to focus a field in Firefox, I get the following 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 ::
>>>file:///C:/Documents%20and%20Settings/Edd/Desktop/test.html :: valText
>>>:: line 24" data: no]
>>>Source File: file:///C:/Documents%20and%20Settings/Edd/Desktop/test.html
>>>Line: 24
>>>
>>>Anyone have any ideas as to why this is happening?
>>>


....

>
> I get that error too. I got up Mozilla 1.6, and do not find the error there.
>
> When does Firefox .9 come out?
>
> install Mozilla 1.7RC3 and test,
>


I just installed FireFox 0.9, and still get the error. This is very
dissappointing. Not only because the error is still present, but
because there are many many people who get this error, and who are
frustrated with it, and cannot seem to find any information about it.

This is the main problem with open-source - if it works, it's great, but
it's hard to figger out stuff that does not work.
 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      06-25-2004
Paul Thompson wrote:
> Paul THompson wrote:
>> Grant Wagner <(E-Mail Removed)> wrote [...]:
>>> Geoff wrote:
>>>> When trying to focus a field in Firefox, I get the following
>>>> 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 ::
>>>> file:///C:/Documents%20and%20Settings/Edd/Desktop/test.html ::
>>>> valText :: line 24" data: no] Source File:
>>>> file:///C:/Documents%20and%20Settings/Edd/Desktop/test.html
>>>> Line: 24
>>> [...]

>> [...]
>> I get that error too. I got up Mozilla 1.6, and do not find the
>> error there. When does Firefox .9 come out?
>>
>> install Mozilla 1.7RC3 and test,

>
> I just installed FireFox 0.9, and still get the error.


URL of your test case?

> This is very dissappointing. Not only because the error is still
> present, but because there are many many people who get this error,
> and who are frustrated with it, and cannot seem to find any
> information about it.


<http://bugzilla.mozilla.org/> would be the place to search for the
bug and, if not already submitted, to submit it for clarification
and possibly for resolution of it.

> This is the main problem with open-source - if it works, it's great,
> but it's hard to figger out stuff that does not work.


On the contrary. It is Open Source which enables you to fix the
bug yourself or just point out possible solutions if you are able,
or just report it and wait for the community to fix it (hopefully
in the next nightly, a comparably short time) if you are not. Try
that with Closed Source, i.e. binaries coming from one vendor only.


PointedEars
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Firefox 1.5 be installed along side Firefox 1.0.6? Zygon Curry Firefox 6 09-14-2005 11:28 AM
Firefox/Linux import bookmarks from Firefox/Windows? Marek Williams Firefox 2 06-11-2005 04:22 PM
Yahoo! Toolbar Beta for Firefox - Not Compatible with Firefox 1.0.2? NA Firefox 6 04-02-2005 06:13 PM
Firefox gamed - Drudge getting around Firefox popup blocker Venger Firefox 10 12-22-2004 04:37 AM
so what does IE or any of the IE shells have over firefox ? (any anti firefox ppl bother looking at recent plugins available?) *ProteanThread* Firefox 12 10-20-2004 08:31 AM



Advertisments