User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 456,433 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,641 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 5666 | Replies: 16
Reply
Join Date: May 2007
Posts: 3
Reputation: satheeshmanian is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
satheeshmanian satheeshmanian is offline Offline
Newbie Poster

'null' is null or not an object

  #1  
Jul 2nd, 2007
Hi All,
When i tried to execute my ASP.Net Application, I got the Runtime error in IE " 'null' is null or not an object ". Im using Visual Studio.Net 2005 and using some Ajax Controls in my application. If i click some Events, it shows the above message. Please help me to do .... Very thankful to you .....
Last edited by stymiee : Jul 2nd, 2007 at 11:15 am. Reason: Removed unecessary bbcode
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2006
Location: New Jersey
Posts: 1,422
Reputation: stymiee is on a distinguished road 
Rep Power: 5
Solved Threads: 34
Moderator
stymiee's Avatar
stymiee stymiee is offline Offline
He's No Good To Me Dead

Re: 'null' is null or not an object

  #2  
Jul 2nd, 2007
Null means it is nothing. It has no value or state of any kind.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Reply With Quote  
Join Date: May 2007
Posts: 3
Reputation: satheeshmanian is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
satheeshmanian satheeshmanian is offline Offline
Newbie Poster

Re: 'null' is null or not an object

  #3  
Oct 4th, 2007
Originally Posted by stymiee View Post
Null means it is nothing. It has no value or state of any kind.
I asked if there is any Solution for that error.
Reply With Quote  
Join Date: Jul 2006
Location: Deptford, London
Posts: 971
Reputation: MattEvans has a spectacular aura about MattEvans has a spectacular aura about 
Rep Power: 5
Solved Threads: 48
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Posting Shark

Re: 'null' is null or not an object

  #4  
Oct 4th, 2007
There's probably a solution to the specific problem in your code that's causing the error message. But it's an oft-encountered message and doesn't indicate anything by itself; just that a dereferencing problem occured somewhere. Is it an error in clientside Javascript or server ASP code? Post code if you have some idea where the problem may be... but, please don't post masses of code. Does the error have a line number? if so, post that line, and the block that the line is in ( i.e. the function it's in )
Plato forgot the nullahedron..
Reply With Quote  
Join Date: Jan 2007
Posts: 2,604
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 119
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: 'null' is null or not an object

  #5  
Oct 7th, 2007
Several thoughts:

- The word "null" is a JS keyword. You can't use it for a variable, object, function, or id name.

- You could be trying to use a variable initially set as a pointer after its value has been changed to a non-pointer. This is usually the result of a typogoofical error.

- Did you forget to make variables local to functions? If so, two different functions might be using the same global variable for different purposes.

- Is your ISP adding ads to your page? if so, their code might be interacting with your code.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Jun 2008
Location: Dhaka
Posts: 10
Reputation: iqbalhosan is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
iqbalhosan iqbalhosan is offline Offline
Newbie Poster

Re: 'null' is null or not an object

  #6  
Jul 30th, 2008
remember one thing very clearly that null is nothing. even null is not equal to null. variable initializing may fix your problem.
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 7,012
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 25
Solved Threads: 368
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: 'null' is null or not an object

  #7  
Jul 30th, 2008
> even null is not equal to null
window.alert(null === null);
There ya go!
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Join Date: Jun 2008
Location: Dhaka
Posts: 10
Reputation: iqbalhosan is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
iqbalhosan iqbalhosan is offline Offline
Newbie Poster

Re: sorry sir null really is not equal to null

  #8  
Jul 31st, 2008
<html>
	<head>
		<script language="javascript">
			function nullTest()
			{
				var test=null;
				
				if(document.getElementById('email').value===test)
				{
					alert("Yes null equal to null");
				}
				else
					alert("No null is not equal to null");
					
			}
		</script>
	</head>
	<body>
		<form onsubmit='nullTest();'>
			<p>Email	:
			<input  id="email" type="text" value=""/>
			<input  type="submit" value="Submit"/>
		</form>
	</body>
</html>
Last edited by Tekmaven : Jul 31st, 2008 at 6:33 am. Reason: Code tags
Reply With Quote  
Join Date: Jul 2006
Location: Deptford, London
Posts: 971
Reputation: MattEvans has a spectacular aura about MattEvans has a spectacular aura about 
Rep Power: 5
Solved Threads: 48
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Posting Shark

Re: sorry sir null really is not equal to null

  #9  
Jul 31st, 2008
All that code proves is that null is not equal to the empty string. The value of the 'email' field will not be initialized to null, it'll be initialized to "".

However -- and it would be quite annoying otherwise -- null certainly compares to null.

Null also compares to undefined: ( undefined == null ) is always true.

This is a rather old thread aswel ( it's been 10 months ). I imagine that the original poster has fixed the problem, by now.
Plato forgot the nullahedron..
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 7,012
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 25
Solved Threads: 368
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: 'null' is null or not an object

  #10  
Jul 31st, 2008
> Null also compares to undefined: ( undefined == null ) is always true.

...which is often misleading as they stand for two different things and have different types. A better way in almost all cases would be to use the strict comparison operator to get an accurate, type safe result.
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 1:33 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC