Microsoft JScript运行时错误:是否需要对象? [英] Microsoft JScript runtime error: Object required?

查看:80
本文介绍了Microsoft JScript运行时错误:是否需要对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi在我的javascript函数中遇到此错误..


hi am getting this error in my javascript function..


function resizeMastersLayout() {
//in this line
    var layoutPosition = document.getElementById('hfMinMaxRestore').value;
    minMaxRestoreButton(layoutPosition);
    if (layoutPosition == 'Minimise') {
        document.getElementById('divInputSliding').style.display = 'block';
        document.getElementById('divGridSliding').style.display = 'none';
    }



谁能建议我如何避免此错误.
Thanks



can any one suggest me how to avoid this error.
thanks

推荐答案

在If循环或发布中进行比较之前,检查var layoutPosition是否为空
Check if var layoutPosition is coming null before comparing in If loop or post


这是因为您的C#代码是没有在所有代码路径中设置hiddenfield值"hfMinMaxRestore".您需要检查您的C#代码.

或将其发布以获取更具体的解决方案
It is because your C# code is not setting hiddenfield value "hfMinMaxRestore" in all code path. you need to check your c# code .

or post it for more specific solution


这篇关于Microsoft JScript运行时错误:是否需要对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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