Today I encountered a javascript error: "Access is Denied" in IE6.0.
This module I run allows the user to download a excel file which contains some table concerned in DB and their all fields, also allows to set a alias for each field, and upload the file contains these aliases.
At first, the browser was navigated to the select table page, there're two buttons('Download Table Template' and 'Upload Defined Alias' button) and a list which contains all tables. These two operations use one form and change it's action attribute with javascript.
Select one table and Click the 'Download Table Template' button, The save dialog will be shown, if this operation was canceled there will be no javascript error and can do any other operation. But the file was saved, the other operation and download operation will be stopped because of the javascript error "Access is Denied"(the line number shows cannot access the form).
The same operation was done in IE7.0 and firefox2.0, no javascript found. WHY? Could somebody help me?
Below is a FAQ found in 'http://www.dannyg.com/ref/jsminifaq.html'.
Q. What does the IE "Access is Denied" error mean?
A. The "Access Denied" error in any browser usually means that a script in one window or frame is trying to access another window or frame whose document's domain is different from the document containing the script. What can seem odd about this is that you get this error in IE for Windows frequently when a script in one window generates a new window (with window.open()), and content for that other window is dynamically created from the same script doing the opening. The focus() method also triggers the error.
The error can also occur if scripts try to access objects, properties, or methods that have been locked down by Microsoft's security platoon. For instance, the document.styleSheets.rules property used to be accessible in IE 5 and IE 5.5, but is not in IE 6.
For the new window problem, there is a bit of history associated with the problem and workarounds. For example, the problem occurs frequently when the scripts are being run from the local hard disk. You get a clue about the situation in the titlebar of the new window: It forces an about:blank URL to the new window, which is a protocol:domain that differs from wherever your main window's script comes from. If, however, you put the same main window document on a server, and access it via http:, the problem goes away.
There is a workaround for the local-only problem: In the first parameter of the window.open() method call, load a real document (even if it is a content-free HTML document) into the sub-window before using document.write() to generate content for the subwindow. The loading action 'legitimizes' the window as coming from the same domain as your main window's document.
(This solution does not affect scripts that load a page from a secure server into a separate window or frame. An http: protocol in one window and https: in the other--even if from the same server.domain--yield a security mismatch and "Access Denied." Setting the document.domain properties of both pages may solve the problem (but I am unable to test it for sure).)
For other situations (such as the document.styleSheets.cssRules problem, there are no workarounds, so you'll have to find another way around your task.
One more source of this error in IE occurs if you assign a too-long search string to a URL or a form (using the GET method) has lots of elements and data. The HTTP GET method has a built-in limit of approximately 512 characters. If you run into the problem, change the method to POST, which has no data length limit. But POST won't reflect the search string in the URL of the replacement page (in case you're expecting to parse that data as a way to convey data from one page to the next).
分享到:
相关推荐
处理搭建好LNMP环境之后,呈现了Access Denied错误 搭建好LNMP环境之后,呈现了Access Denied错误,现已扫除掉文件权限的问题也扫除掉是Nginx的问题,而是无法解析PHP的问题。 发现网上的很多大牛都是经过Nginx的...
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 解决: 1.打开在创建mysql容器时挂载的conf目录下的mysqld.cnf(如下文件) 我创建docker的姿势 2.进入mysqlId.cnf文件中在...
首先是不知道怎么忽然mysql用命令行,workbench都登录不了,都提示’Access denied for user ‘root’@’localhost’。 数据库卸载重装了几次都不行。好像感觉数据清理不干净。解决的过程遇到的坑,这里记录分享下。...
### 关于Jedis连接Linux上的Redis出现DENIED Redis is running in protected mode问题的解决方案 #### 一、问题背景 在尝试使用Jedis客户端通过网络连接Linux服务器上的Redis时,可能会遇到一个常见的错误提示:...
Amazon 卖家接口Demo,官方Demo一堆错误,千万不要被误导。 解决: 1、Access to requested resource is denied 2、The security token included in the request is invalid 有疑问可提问
error connecting: Error: ER_ACCESS_DENIED_ERROR: Access denied for user ‘root’@’DESKTOP-NLN1UTH’ (using password: YES)加密规则的坑(docker启动) 端口问题的坑。 error connecting: Error: ER_ACCESS_...
可能会遇到一种较为常见的问题:即配置完成后,虽然能够正常访问Web应用,但在尝试访问后台管理界面(如Server Status、Manager App、Host Manager)时却收到“403 Access Denied”的错误提示。这一问题不仅限于本地...
标题 "2021-Access-Denied:拒绝访问" 提到的是一个关于Sitecore的安全问题,具体可能是指在尝试访问或操作Sitecore系统时遇到的权限限制或身份验证错误。Sitecore是一款强大的内容管理系统,主要用于构建和管理企业...
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) 第一步:编辑mysql安装目录中的配置文件my.ini,在[mysqld]这个条目下加入 skip-grant-tables 如下图: 保存退出后 第二...
Access Denied.md
Unhandled rejection SequelizeAccessDeniedError: Access denied for user 'lupeng'@'localhost' (using password: YES) 这是Node在使用Sequlize连接Mysql数据时报的错,关键看冒号后面的错误:访问拒绝,关键是...
在排除没有登录和网络的原因:我还是报的如下错误 原因镜像的名字没有按照规范命名: ...#我把 my_redis:v1 改成了 langxuhao/my_redis:v2 [root@instance-f4khj00x ~]# docker push langxuhao/my_redis:v2 ...
Domino 发外网邮件时可能会出现 SMTP Protocol Returned a Permanent Error 554 Relay access denied 错误,这是由于中继访问被拒绝所致。为了解决这个问题,我们需要了解 Domino 配置设置和 SMTP 协议的工作原理。 ...
主要给大家介绍了如何解决mysql在创建数据库后出现:Access denied for user 'root'@'%' to database 'xxx'的错误提示,文中介绍的非常详细,需要的朋友可以参考借鉴,下面来一起看看吧。
Compile Error :Permission Denied 症状 III 当使用应用程序向导时,Microsoft Visual Basic 将显示与以下内容类似的错误对话框: 60: Method ~ of Object ~ failed 症状 IV 当尝试运行项目时,Microsoft Visual ...
大家好,目前,我在c#2008(SQL Server 2008)中使用asp.net。 即时通讯将excel文件上传到服务器,并将相同的数据加载到... 突然出现错误没有可用的错误消息,结果代码为:E_ACCESSDENIED(0x80070005)。 那...
在使用MySQL数据库时,有时会出现一个常见的错误:`ERROR 1045 (28000): Access denied for user "root"@"localhost" (using password: YES)`。这个错误表明,你尝试用root用户登录MySQL,但系统拒绝了你的访问,...
在MySQL中,错误号1045 (28000)通常表示“Access denied for user”,这是一个常见的权限问题,意味着指定的用户无法使用提供的密码登录数据库服务器。本篇文章将详细探讨这个问题的原因以及两种可能的解决方案。 #...
在新安装MySQL后,有时可能会遇到登录问题,特别是当你尝试使用`mysql -uroot -p`命令并输入默认密码时,系统返回`ERROR 1045 (28000): Access denied for user`错误,这意味着你的登录凭据无效或者你没有足够的权限...