473,653 Members | 2,968 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

field.focus() in Firefox 0.8 >

When trying to focus a field in Firefox, I get the following error:

Error: [Exception... "'Permissio n denied to get property
XULElement.sele ctedIndex' when calling method:
[nsIAutoComplete Popup::selected Index]" nsresult: "0x8057001e
(NS_ERROR_XPC_J S_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
Jul 23 '05 #1
6 5016
Geoff wrote:
When trying to focus a field in Firefox, I get the following error:

Error: [Exception... "'Permissio n denied to get property
XULElement.sele ctedIndex' when calling method:
[nsIAutoComplete Popup::selected Index]" nsresult: "0x8057001e
(NS_ERROR_XPC_J S_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 <gw*****@agrico reunited.com>

* 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
Jul 23 '05 #2
In a land long ago, in a time far away
ge***@hiphopist .com (Geoff) wrote:
When trying to focus a field in Firefox, I get the following error:

Error: [Exception... "'Permissio n denied to get property
XULElement.sel ectedIndex' when calling method:
[nsIAutoComplete Popup::selected Index]" 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

:)

Jul 23 '05 #3
Grant Wagner <gw*****@agrico reunited.com> wrote in message news:<40******* ********@agrico reunited.com>.. .
Geoff wrote:
When trying to focus a field in Firefox, I get the following error:

Error: [Exception... "'Permissio n denied to get property
XULElement.sele ctedIndex' when calling method:
[nsIAutoComplete Popup::selected Index]" nsresult: "0x8057001e
(NS_ERROR_XPC_J S_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 <gw*****@agrico reunited.com>

* 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

Jul 23 '05 #4
Paul THompson wrote:
Grant Wagner <gw*****@agrico reunited.com> wrote in message news:<40******* ********@agrico reunited.com>.. .
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_FAILU RE)
[nsIDOMWindowInt ernal.focus]" nsresult: "0x80004005 (NS_ERROR_FAILU RE)" location: "JS frame ::
chrome://tabextensions/content/tabextensions.x ml :: 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 <gw*****@agrico reunited.com>

* 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
Jul 23 '05 #5
Paul THompson wrote:
Grant Wagner <gw*****@agrico reunited.com> wrote in message news:<40******* ********@agrico reunited.com>.. .
Geoff wrote:

When trying to focus a field in Firefox, I get the following error:

Error: [Exception... "'Permissio n denied to get property
XULElement.s electedIndex' when calling method:
[nsIAutoComplete Popup::selected Index]" nsresult: "0x8057001e
(NS_ERROR_XP C_JS_THREW_STRI NG)" 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.
Jul 23 '05 #6
Paul Thompson wrote:
Paul THompson wrote:
Grant Wagner <gw*****@agrico reunited.com> wrote [...]:
Geoff wrote:
When trying to focus a field in Firefox, I get the following
error:

Error: [Exception... "'Permissio n denied to get property
XULElement.sele ctedIndex' when calling method:
[nsIAutoComplete Popup::selected Index]" nsresult: "0x8057001e
(NS_ERROR_XPC_J S_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.mozill a.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
Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
10550
by: Chris | last post by:
I'm using eight links listed horizontally as a menu on my site. I'm using font-variant:small-caps and they are padded so that they mimic buttons. My gripe is with the way IE handles the focus rectangle on these links. It insists on drawing this crazy shape that traces the text, which with small caps looks rather assinine. Firefox handles the same task very gracefully (yeah Gecko!) and I would like to force IE to do the same. The site...
6
2021
by: joe | last post by:
Hi Everyone, could anyone comment on the following problem: I have a textbox being appended to a cell in a table, and am trying to call focus() on like this: <snip> c01.removeChild(answerbox); answerbox=document.createElement('input'); answerbox.addEventListener("change",check_answer,false); answerbox.style.fontSize=FONTSIZE; answerbox.style.backgroundColor=COLOR_ANSWBG;
2
11480
by: Scott Eade | last post by:
I am using select()/focus() to position the cursor at a particular field on a form. This works, but when the user presses the Tab key in IE the cursor jumps to the address bar rather than the next field (Firefox is fine). Does anyone know why this might be happening and how to stop it? Below is the code that I use to set the cursor position (it is somewhat convoluted because it is generated via a series of macros). The cursor is...
3
2653
by: tnhoe | last post by:
Hi, I would like to set focus to a field in a form inside a tab page. It is a multiple tabs under different divisions (eg: sc1,sc2,sc3,etc) <div name='sc1'> <form name='form1'> <input name='myfield'> </form> </div>
4
3595
by: Csaba Gabor | last post by:
Up until a few weeks ago, javascript code like window.open("http://mydomain.com", "windowName"); would always bring my new or reused window to the top, with focus. Lately, Firefox (Deer park alpha 2) only brings it to the top if the window is new. If it's being reused, the window does not come to the foreground (with IE 6 it does). Is there a new way in Mozilla/Firefox that I can ensure that this
5
8147
by: Vincent van Beveren | last post by:
Hi everyone, I have a page with a login box. Because of lack of space, instead of labels I put the descriptive text in the input fields (so username input says 'username', and password input says 'password'). The password field however, once it does have the focus, it should mask its input. Now what I've done, and works in firefox, is onfocus="this.type='password'; this.value='';". (Its a bit more complex than that, but this is...
2
3133
by: henrywuxg | last post by:
Hi All, I would like to use Period Key(.) besides Tab to toggle from one textbox to another when user is editing IP addresses, which have four textboxes. The function in below works fine with IE5, but it has strange problem with Firefox 1.5.0.8. <!-- <td>IP Address <input type="text" size="3" maxlength="3" name="ip_1"
6
2273
KeredDrahcir
by: KeredDrahcir | last post by:
I have an Enquiry Form but when you log onto it for some reason I can't foucs on any of the first three input fields on the first radio buttons. The first field that can be focused on is the Enquiry field which is a text area. In IE the only way I can focus is to click the very start or very end of the fields which does not help users, and I can't get them to focus at all in Firefox, Safari, Opera or Google Chrome. I was able to set the...
0
8370
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8283
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8811
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8470
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7302
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5620
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4291
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1914
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.