469,898 Members | 2,305 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Unexplainable error in Mozilla

Why do I get the following error message in Mozilla if I press a key in the
input box?

================================

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:///D:/test/index.html :: message :: line 4" data: no]
Source File: file:///D:/test/index.html
Line: 4

================================

<html>
<script type="text/javascript">
function showmessage() {
alert("Why does Mozilla report an error?")
}

</script>

<body>
<form name="myform">
<input type="text" name="myinputbox" value=""
onKeyPress="showmessage()">
</form>
</body>
</html>

================================

What's wrong with my code?
Stefan
Oct 31 '05 #1
4 1404
I get that occasional when using the focus() function to set focus to
some elements in FireFox.
I've yet to find a solution to it anywhere, so if you find one I'd be
most interested :D

Oct 31 '05 #2
VK

Xandax wrote:
I get that occasional when using the focus() function to set focus to
some elements in FireFox.
I've yet to find a solution to it anywhere, so if you find one I'd be
most interested :D

Try not to pay too much attention to that ;-) The guys are making XPCom
/ XPConnect right "on the go" and right on the current browser version
using their users as laboratory rats. A semi-questionnable approach but
proven by companies like Microsoft to be the most results effective.
:-)

More precisely it's an XPConnect security interface is leaking. When
starting to type anything in a form field it leads to autocomplete call
which in an "out-of-sandbox" situation has to run security check for
UniversalPropertyRead privilege (but should stay quiet in the regular
situation).

Report it to bugzilla.mozilla.org and try to forget it for now (?)
P.S. As it doesn't stop script execution we have to mark that with this
bug FireFox introduces new program flow event besides Error: a
Perl-like Warning. So there is nothing bad without something good in it
:-)

Oct 31 '05 #3
Xandax wrote:
I get that occasional when using the focus() function to set focus to
some elements in FireFox.
I've yet to find a solution to it anywhere, so if you find one I'd be
most interested :D


https://bugzilla.mozilla.org/show_bug.cgi?id=236791

A workaround is autocomplete="OFF" on the input field.

I am waiting forever for them to fix it.
Nov 1 '05 #4
Hmm - not really a suitible solution for my case seeing as customers
often wants autocomplete, but perhaps I can turn some completion off in
some of my fields and perhaps reduce the number of exceptions I get.

But as said by the previous poster (VK), it doesn't break script
execution (thank god :D), so I can live with it, it just annoys me :D

Nov 2 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Peter | last post: by
8 posts views Thread by Mr. x | last post: by
5 posts views Thread by DU | last post: by
8 posts views Thread by Grant Richard | last post: by
3 posts views Thread by Nathan Sokalski | last post: by
18 posts views Thread by andreas.luethi | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.