SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

Null is null or not an object
All About SharePoint - S.S. Ahmed - MVP Microsoft SharePoint
Have you seen this error before? Did you find a solution? I was getting this javascript error on the click of a button that had a simple rule attached to it. Everytime I clicked the button, it produced this javascript error:

Null is null or not an object.

After some debugging, I noticed that the error was occuring in the "owsbrows.js". This file contained a line that was trying to load a value from the control that was clicked in the form. The control returned "null" and hence InfoPath generated this beautiful error message.

Reason?

The postback setting of the button was set to "Never".

Solution?

Set the postback setting of the button to "Always".

1. Right click the button.
2. Select "Button Properties".
3. Select "Browser forms" tab.
4. Select "Always". Note: Selecting the default recommended option "Only when necessary for correct rendering of the form (recommended)"will not solve this problem.

When you are using rules, you  must set the postback settings of the button to "Always" so that the click event sends data to the server everytime the button is clicked.

p.s. The error occurs in browser enabled forms.


Posted 10-16-2007 12:35 PM by ssa

Comments

Blogger Loser » Null is null or not an object wrote Blogger Loser » Null is null or not an object
on 10-16-2007 12:25 PM

Pingback from  Blogger Loser » Null is null or not an object

Life insurance advisor wrote re: Null is null or not an object
on 10-17-2007 12:54 AM

Hi,

Its a very useful post.I found it is very interesting and more informative.I have come across this error.But i don't know the solution for this.you are great pa.I shared this information with my colleagues and friends also.They also thanked me a lot.

Thanks for sharing with us.I am expecting more informative blogs like this from you in future.Once again,"Thanks a lot"

Good Luck!

Blogger Loser » Null is null or not an object wrote Blogger Loser » Null is null or not an object
on 10-17-2007 12:48 PM

Pingback from  Blogger Loser » Null is null or not an object

hosthg » Blog Archive » Null is null or not an object wrote hosthg » Blog Archive » Null is null or not an object
on 10-22-2007 6:17 AM

Pingback from  hosthg  » Blog Archive   » Null is null or not an object

crucial wrote re: Null is null or not an object
on 11-19-2007 9:57 AM

Had this error too - thanks for the solution. Setting the control the conditional expression was checking to always post back to the server fixed the problem.

ssa wrote re: Null is null or not an object
on 11-25-2007 10:29 PM

Thank you crucial!

john mcmenamin wrote re: Null is null or not an object
on 02-21-2008 9:19 AM

Hi. I'm now getting this null or not an object whenever I use my windows xp YAHOO internet browser.

Can anyone walk me through(step by step) to eliminate this?

ssa wrote re: Null is null or not an object
on 03-22-2008 11:00 PM

John

See debugging infopath forms article on this blog. That article will help you in locating the source of the article. Once you know the source (control) that is causing the problem, you can follow the steps mentioned in this post to eliminate the error.

Regards

SSA

Venky wrote re: Null is null or not an object
on 04-25-2008 12:38 AM

I am getting the same error by placing simple user control with button with click event. As soon as I click button, the error shows up and no infopath is involved. Please help ....

Null is null or not an object in MOSS 2007 without infopath ...

ssa wrote re: Null is null or not an object
on 04-27-2008 7:45 PM

Venky

It depends on the control that you are using. Make sure the postback event of the control is set to true.

s is null or not an object wrote s is null or not an object
on 06-03-2008 10:27 AM

Pingback from  s is null or not an object

object null or not object wrote object null or not object
on 07-29-2008 2:42 AM

Pingback from  object null or not object

null is null or not an object wrote re: Null is null or not an object
on 09-10-2008 5:20 PM

I am getting this error under different circumstances.  The problem only happens in IE.  It happens when a flash app calls a very simple javascript function in its container that does nothing more than add some HTML to the page using the innerHTML property.

The javascript is there, the DOM nodes are there, and IE was the browser that introduced innerHTML.  Does anyone know what IE doesn't like about this scenario?

In case it matters, I am using  AS3's externalInterface method to call the javascript, and the flash player we are using is version 9.

Bharat Sukhwal wrote re: Null is null or not an object
on 02-04-2009 4:40 AM

I applying the conditional formatting on the for section in infopath. I followed above solution but error remain same

ssa wrote re: Null is null or not an object
on 02-09-2009 8:30 AM

If you have multiple controls, make sure you change the postback settings of the control that causes the problem.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.