SCRIPT5007:无法获取未定义或空引用的属性“值” - [英] SCRIPT5007: Unable to get property 'value' of undefined or null reference -

查看:196
本文介绍了SCRIPT5007:无法获取未定义或空引用的属性“值” - 的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b

我们在以下脚本的第5行收到以下错误;



无法获得财产未定义或空引用的值

Hi
We are getting the following error on line 5 of the following script;

Uanble to get property 'value' of undefined or null reference

function initPart() {
	if (!(prepop)) {
		//loadActivities();
		//loadSecLevels();
		loadValues("seclevel", "getseclevels.asp?sl=" + document.getElementById("selSecLevel").value);
		loadCaveats();
		loadLookup("Priority", "ROUTINE");
		loadLookup("Releasability", "");
		}
}

function validateCreate() {
  var classuri = document.getElementById("classuri");
  if (classuri.value == 0) {
    showError("Error - This field is mandatory and must be completed - Activity");
    return false;
  }
}



我对Javascript的了解很少,所以任何帮助都会很棒。



谢谢



Matt Hunter


My knowledge of Javascript is minimal so any help would be great.

Thanks

Matt Hunter

推荐答案

假设第5行是:

Assuming that line 5 is:
loadValues("seclevel", "getseclevels.asp?sl=" + document.getElementById("selSecLevel").value);



只能怀疑 document.getElementById(selSecLevel)返回空引用,即它找不到具有该id的元素。


one can only suspect that document.getElementById("selSecLevel") is returning a null reference, i.e. it cannot find an element with that id.


这篇关于SCRIPT5007:无法获取未定义或空引用的属性“值” - 的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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