Question : Error

Can Sombody please help me wirh this js error?

Meldung: 'null' ist Null oder kein Objekt
Zeile: 116
Zeichen: 2
Code: 0
URI: http://wiki.mwz-fm.com/hallowelt/js/hw_ajax.js
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
var hw_ajax;
function hw_createRequestObject() {
//    var browser = navigator.appName;
//    if(browser == "Microsoft Internet Explorer"){
//        ro = new ActiveXObject("Microsoft.XMLHTTP");
//    }else{
//        ro = new XMLHttpRequest();
//    }

      if (window.XMLHttpRequest)
	  {
		  hw_ajax = new XMLHttpRequest();
	  }
      else if (window.ActiveXObject)
	  {
		  hw_ajax = new ActiveXObject("Microsoft.XMLHTTP");
	  }
}

hw_createRequestObject();


function hw_requestTest()
{
	//alert(wgScriptPath);
	hw_ajax.open('get', wgScriptPath+'/hallowelt/lib/hw_ajax.php?ajax_test');
    hw_ajax.onreadystatechange = function()
	{
    	//alert('irgendwas');

		if(hw_ajax.readyState == 4)
		{
        	var response = hw_ajax.responseText;
//			window.status = response;
		}
	}
	hw_ajax.send(null);
}

function hw_requestWithAnswer(url)
{
    hw_ajax.open('get', url);
    hw_ajax.onreadystatechange = function()
	{
	    if(hw_ajax.readyState == 4)
		{
        	var response = hw_ajax.responseText;
			hw_alert(response, 'ok');
		}
	}
	hw_ajax.send(null);
}

// return value must consist of two parts divided by a semicolon: a) 'yes' or 'no' for reload, b) the message
function hw_requestWithAnswerAndReload(url)
{
    hw_ajax.open('get', url);
    hw_ajax.onreadystatechange = function()
	{
	    if(hw_ajax.readyState == 4)
		{
        	var response = hw_ajax.responseText;
			var res = eval(response);
			if((typeof(res) == 'object' && res[0] == 'SUC')) {
				hw_alert(response, 'reload');
			}
			else {
				hw_alert(response, 'ok');
			}
		}
	}
	hw_ajax.send(null);
}


function hw_message (text)
{
	hw_alert(text);
}

function hw_update_select_csv (sel_id, opts)
{
	opts = opts.split(';');
	hw_update_select(sel_id, opts);
}

function hw_update_select(sel_id, opts)
{
	sel = document.getElementById(sel_id);
	if (sel.options.length > 0)
		for (i=sel.options.length; i>=0; i--) sel.remove(i);
	for (i=0; i<opts.length-1; i++)
	{
		opt = document.createElement("OPTION");
		if (opts[i].indexOf('@@') != -1)
		{
			t = opts[i].split('@@');
			opt.value=t[0];
			opt.text=t[1];
		}
		else
		{
			opt.value=opts[i];
			opt.text=opts[i];
		}
		try { sel.add(opt, null); }
		catch(e) { sel.add(opt); } // IE
	}
}

function hw_load_js(url)
{
	hw_ajax.open('get', url, false);
	hw_ajax.send(null);
	var response = hw_ajax.responseText;
	eval(response);
}

function hw_load_css(url)
{
	 // IE
  	if(document.createStyleSheet) document.createStyleSheet(url);
    // Mozilla, Netscape, Opera
  	else
	{
    	var objStyle = document.createElement("style");
    	var objText = document.createTextNode("@import url("+url+") screen;");
    	objStyle.appendChild(objText);
    	document.getElementsByTagName("head")[0].appendChild(objStyle);
  	}
}

function hw_inc_js(filename) {
	var body = document.getElementsByTagName('head').item(0);
	script = document.createElement('script');
	script.src = filename;
	script.type = 'text/javascript';
	body.appendChild(script);
}

function hw_inc_css(filename) {
	var body = document.getElementsByTagName('head').item(0);
	style = document.createElement('link');
	style.rel = 'stylesheet';
	style.type = 'text/css';
	style.href = filename;
	body.appendChild(style);
}

i18n.load("js");
Attachments:
 
 

Answer : Error

OK, now you know the answer to your original question, why you got the 'null' ist Null oder kein Objekt : Because the url   does not return a valid response (null, but your code tries to use it anyways, without further checks on validity)

Now your next step to see why the php does not work. I am not an expert in wiki, but it seems there is some wrong installation or configuration.


Random Solutions  
 
programming4us programming4us