“访问被拒绝”在IE上的node.focus() [英] "Access is denied" in IE on node.focus()

查看:78
本文介绍了“访问被拒绝”在IE上的node.focus()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我收到访问被拒绝当我尝试使用node.focus()来聚焦

输入框时IE中的错误


我的理解是,只有当域是
不同的Javascript和它试图关注的元素。

它可能是跨框架的,但一切都来自同一个域。


关于这一点最奇怪的部分是即使我得到了Access is

拒绝错误,文本框实际上是焦点。或许更奇怪,

如果我在

focus()之前立即发出警报()似乎不会发生。也许它与焦点()被调用时丢失的页面有关...


非常奇怪的行为,和往常一样,IE基本上是没有帮助

隔离问题所在。


感谢您的帮助。


-Jeff

Hi,

I''m getting an "Access is denied" error in IE when I try to focus an
input box with node.focus()

My understanding is that should only happen when the domains are
different of the Javascript and the element that its trying to focus.
It might be cross-frame, but everything comes from the same domain.

The oddest part about this is that even though I get the "Access is
denied" error, the textbox actually does focus. Perhaps odder still,
it seems to not happen if I put an alert() immediately before the
focus(). Perhaps it has something to do with the page having lost
focus when focus() is called?

Very strange behavior and, as usual, IE is basically no help in
isolating what the problem is.

Thanks for any help.

-Jeff

推荐答案

9月26日凌晨4点12分,Jeff Bigham< jeffrey.big ... @ gmail.comwrote:
On Sep 26, 4:12*am, Jeff Bigham <jeffrey.big...@gmail.comwrote:




我得到一个访问被拒绝当我尝试使用node.focus()来聚焦

输入框时IE中的错误


我的理解是,只有当域是
不同的Javascript和它试图关注的元素。

它可能是跨框架的,但一切都来自同一个域。


关于这一点最奇怪的部分是即使我得到了Access is

拒绝错误,文本框实际上是焦点。 *或许更奇怪,

如果我在

focus()之前立即发出警报()似乎不会发生。 *当调用focus()时,也许它与页面丢失了

焦点?


非常奇怪的行为,和往常一样,IE是基本上没有帮助

隔离问题所在。
Hi,

I''m getting an "Access is denied" error in IE when I try to focus an
input box with node.focus()

My understanding is that should only happen when the domains are
different of the Javascript and the element that its trying to focus.
It might be cross-frame, but everything comes from the same domain.

The oddest part about this is that even though I get the "Access is
denied" error, the textbox actually does focus. *Perhaps odder still,
it seems to not happen if I put an alert() immediately before the
focus(). *Perhaps it has something to do with the page having lost
focus when focus() is called?

Very strange behavior and, as usual, IE is basically no help in
isolating what the problem is.



也许这会有所帮助。 < http://www.dannyg.com/ref/jsminifaq.html# q15


>
>


感谢您的帮助。


-Jeff
Thanks for any help.

-Jeff



HTH,

/ sasuke

HTH,
/sasuke


sasuke写道:
sasuke wrote:

也许这会有所帮助。 < http://www.dannyg.com/ref/jsminifaq.html# q15



只有上半部分可以提供帮助。它变成了通常的Goodman废话

开头的设置文件。两个页面的域名属性可以

解决问题。首先,它并没有解决问题,因为最近的UA倾向于忽视这个属性,并且如果要实现符合
标准,它将使它成为只读;如果两个

请求的二级域名相同,那么它只会解决问题,因为这个属性是打算运行的。并且IE仅显示错误(除非您已禁用显示脚本错误的
,然后

状态栏中只有一个错误图标),其他UA表现出相同的行为但可能会向他们的背景错误控制台发出消息




废话继续IE中此错误的另一个来源...... ;。

HTTP GET *命令*(在RFC 1945和2616中定义)没有内置的

限制(对于请求URI),尤其不是大约512个字符。实际上,

URI根本没有定义限制(在RFC3986中),但是Internet Explorer已经实现了(非常恼人)每个URI 2083个字符的限制 - 一个

MSKB中随时可用的信息,以及它的

解决方法,让Goodman一般有意备份他的任何一个

荒谬声明:< http://support.microsoft.com/kb/208427> ;.


顺便说一下,你应该把Goodman说的所有内容都写下来或写下来。

至少使用少量盐进行Web开发。当我告诉你他的事实命中率似乎比Resig'更低时,你可能得到

图片。

HTH


PointedEars

-

现实主义:HTML 4.01严格

福音:XHTML 1.0 Strict

疯狂:XHTML 1.1作为application / xhtml + xml

- Bjoern Hoehrmann

Only the upper part could help. It becomes the usual Goodman nonsense
starting with "Setting the document.domain properties of both pages may
solve the problem". First of all, it does not solve the problem since
recent UAs tend to disregard this property and would make it read-only if
standards compliance is to be achieved; it would only solve the problem, as
this property was intended to function, if the second-level domain of both
requests were the same. And IE only shows the error (unless you have
disabled showing script errors, then there is only an error icon in the
status bar), other UAs exhibit the same behavior but might issue messages to
their background error consoles instead.

The nonsense goes on with "One more source of this error in IE ...". The
HTTP GET *command* (defined in RFCs 1945 and 2616) does NOT have a built-in
limit (for the request URI), especially not around 512 characters. In fact,
URIs have no limit defined (in RFC3986) at all, but Internet Explorer has
implemented a (quite annoying) limit of 2083 characters per URI -- an
information that is readily available in the MSKB, along with its
workaround, had Goodman the general intention to back up any of his
ridiculous claims: <http://support.microsoft.com/kb/208427>.

Incidentally, you should take everything Goodman says or writes with regard
to Web development with at least a handful of salt. You might get the
picture when I tell you that his facts hit rate appears to be even lower
than Resig''s.
HTH

PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann


9月26日,9: 28 * pm,Thomas''PointedEars''Lahn< PointedE ... @ web.de>

写道:
On Sep 26, 9:28*pm, Thomas ''PointedEars'' Lahn <PointedE...@web.de>
wrote:

>

废话继续IE中此错误的另一个来源......。 *

HTTP GET *命令*(在RFC 1945和2616中定义)没有内置的

限制(对于请求URI),尤其是512左右字符。 *实际上,

URI根本没有定义限制(在RFC3986中),但是Internet Explorer已经实现了(非常恼人)每个URI 2083个字符的限制 - 一个

的信息可以在MSKB中随时获得,以及它的

解决方法,让Goodman一般有意备份他的任何
荒谬的说法:< http://support.microsoft.com/kb/208427>。
>
The nonsense goes on with "One more source of this error in IE ...". *The
HTTP GET *command* (defined in RFCs 1945 and 2616) does NOT have a built-in
limit (for the request URI), especially not around 512 characters. *In fact,
URIs have no limit defined (in RFC3986) at all, but Internet Explorer has
implemented a (quite annoying) limit of 2083 characters per URI -- an
information that is readily available in the MSKB, along with its
workaround, had Goodman the general intention to back up any of his
ridiculous claims: <http://support.microsoft.com/kb/208427>.



但这不是一种解决方法。 IE中的URI限制为2083字节。

句号。您可以在标题或有效负载中发送任何内容,这是另一个完全不同且无关的问题。你是否为b

But that''s not a workaround. URIs are limited to 2083 bytes in IE.
Full stop. That you can send whatever in the headers or in the payload
of a POST is another completely different and unrelated matter. Do you
work for M

这篇关于“访问被拒绝”在IE上的node.focus()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆