•
•
•
•
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
![]() |
•
•
Join Date: May 2007
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 1
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 .....
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
•
•
Join Date: May 2006
Location: New Jersey
Posts: 1,422
Reputation:
Rep Power: 5
Solved Threads: 34
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!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 971
Reputation:
Rep Power: 5
Solved Threads: 48
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..
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.
- 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
> even null is not equal to null
There ya go!
window.alert(null === null);
I don't accept change. I don't deserve to live.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
•
•
Join Date: Jun 2008
Location: Dhaka
Posts: 10
Reputation:
Rep Power: 1
Solved Threads: 0
<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
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 971
Reputation:
Rep Power: 5
Solved Threads: 48
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.
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..
> 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.
...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.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- how to compare a string to null... (C++)
- Generic method parser / invoker (C#)
- Exception Data is Null. This method or property cannot be called on Null values. (VB.NET)
- Null Pointer? will this code work (C)
- Need Help to Print Doubly Linked List(DLL) (Java)
- Can you add pictures/sounds in a win32 console app? (C)
- Need help with DirectX code (C)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Toggle of content
- Next Thread: Pre-Fill Subject and Body fields in Web Outlook



Linear Mode