Firefox的错误 - 的document.all是不确定的(WebUIValidation.js) [英] Firefox error - document.all is undefined (WebUIValidation.js)

查看:184
本文介绍了Firefox的错误 - 的document.all是不确定的(WebUIValidation.js)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个简单的ASP.Net应用程序,其中第一个页面接受一个输入,按一下按钮将用户重定向到下一个页面。
这是工作中的所有其他浏览器(IE,歌剧,Safari浏览器),但什么也没发生在Firefox。没有按钮点击生成的事件并没有回发发生。

I have created a simple ASP.Net application, where first page accepts an input and button click redirects the user to next page.
This is working in all the other browsers (IE, Opera, Safari), but nothing is happening in Firefox. There is no event generated on button click and no postback is happening.

一看到Firefox的错误控制台给我这个错误:

A look into Firefox's error console showed me this error:

的document.all是不确定的
   HTTP://xxx/aspnet_client/system_web/2_0_50727/WebUIValidation.js
  行:30
  行:85

document.all is undefined
http://xxx/aspnet_client/system_web/2_0_50727/WebUIValidation.js
Line: 30
Line: 85

在这里这个错误是WebUIValidation.js遇到的功能是:

The functions where this error is encountered in WebUIValidation.js are:

function ValidatorHookupControlID(controlID, val) {
    if (typeof(controlID) != "string") {
        return;
    }
    var ctrl = document.all[controlID];

...

function ValidatorGetValue(id) {
    var control;
    control = document.all[id];

...

请帮助!

推荐答案

尝试添加到您的web.config &LT; xhtmlConformance模式=遗产/&GT; 和读<一href="http://aspadvice.com/blogs/rbirkby/archive/2006/11/01/Client_2D00_side-validation-in-Firefox.aspx"相对=nofollow>这个博客帖子有关其他信息如何/时,客户端验证器被添加到页面。

Try adding this to your web.config <xhtmlConformance mode="Legacy"/> and reading this blog post for additional information on how/when client side validators are added to the page.

这篇关于Firefox的错误 - 的document.all是不确定的(WebUIValidation.js)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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