微软JScript运行时错误:对象不支持属性或方法“文件上传” [英] Microsoft JScript runtime error: Object doesn't support property or method 'fileUpload'

查看:328
本文介绍了微软JScript运行时错误:对象不支持属性或方法“文件上传”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有应用Ajax和jQuery的功能,我的多个文件附件的问题。下面我code患部;

I am having issues applying ajax and jquery functions to my multiple files attachment. affected part of my Code below;

$(function () {
        $("[id*=FileUpload1]").fileUpload({
            'uploader': 'scripts/uploader.swf',
            'cancelImg': 'images/cancel.png',
            'buttonText': 'Attach Files',
            'script': 'UploadCS.ashx',
            'folder': 'uploads',
            'multi': true,
            'auto': true,
            'onSelect': function (event, ID, file) {
                $("#attachedfiles tr").each(function () {
                    if ($("td", this).eq(0).html() == file.name) {
                        alert(file.name + " already uploaded.");
                        $("[id*=FileUpload1]").fileUploadCancel(ID);
                        return;
                    }
                });
            },
            'onComplete': function (event, ID, file, response, data) {
                $("#attachedfiles").append("<tr><td>" + file.name + "</td><td><a href = 'javascript:;'>[x]</a></td></tr>");
            }
        });
    });

每当我通过VS2010在IE浏览器中运行的应用程序,它停止运行,并宣布在上面的标题所述的问题。但在Mozilla的,它运行但结果预期不来了。我看到的这几个问题,但它似乎没有帮助。任何帮助?

Whenever I run the application through VS2010 on IE, it stops running and it declares the issue stated in the title above. But on Mozilla, it runs but the result expected isn't coming up. I have seen several questions on this but it seems not to help. Any help?

推荐答案

脚本标记不被浏览器识别,如果有明确关闭。

Script tags are not identified by the browser if there are closed explicitly..

写了自闭 script标签

Write up self closing script tags

<script type="text/javascript" src="scripts/jquery-1.8.1.min.js" /> 
<script type="text/javascript" src="scripts/jquery.uploadify.js" />

这篇关于微软JScript运行时错误:对象不支持属性或方法“文件上传”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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