RSS Feed Feed your read!

Bookmark and Share







Tag Cloud

ASP.NET Generic, Best Practices, Business Intelligence, Freeware Releases, InfoPath, Infrastructure, jQuery, Lunch & Learn Events, Project Server, Random, Reporting Services, Search, SharePoint Administration, SharePoint Business Analysis and Project Management, SharePoint Development, Silverlight, Social Networking, Speaking Events, White Paper Releases, Workflow Foundation,

Archives

June 2007 (3)
August 2007 (1)
November 2007 (2)
February 2008 (2)
April 2008 (5)
May 2008 (7)
June 2008 (8)
July 2008 (7)
August 2008 (3)
September 2008 (7)
October 2008 (1)
November 2008 (3)
December 2008 (3)
January 2009 (7)
February 2009 (5)
March 2009 (10)
April 2009 (2)
May 2009 (6)
June 2009 (3)
July 2009 (4)
August 2009 (6)
September 2009 (3)
October 2009 (9)
November 2009 (10)
December 2009 (1)
January 2010 (1)
February 2010 (3)
March 2010 (6)
April 2010 (2)
May 2010 (3)
June 2010 (4)
July 2010 (3)

All my OK Buttons in SharePoint are throwing javascript errors! 

Tags: SharePoint Development

All of a sudden all my ok buttons in all my SharePoint sites started throwing javascript errors whenever they were clicked. For example, if I was in a SharePoint list and I wanted to add a new list item, it would break when I clicked ok.

 

I dug into the issue deeper by enabling javascript debugging in my IE browser, and noticed it was throwing an "Object Expected" javascript error:

 

 

Well, it didn't help any to debug it, but after wasting a few hours I figured out what was causing the problem. It turns out that I had added a script tag into the head of my master page. Nothing crazy about that, or so you'd think, but for some reason it needed to be well formed:

 

Breaks all the OK Buttons: <script type="text/javascript" src="/_layouts/ custom/custom.js" />

 

The Fix: <script type="text/javascript" src="/_layouts/custom/custom.js"></script>

 

I was blown away when I realized this was the problem. Maybe there were some javascript 101 topics I failed to learn in college or something… (either that or SharePoint 101)

 

Phil

 
Posted by Phillip S. Wicklund on 11-Dec-08
0  Comment  |  Trackback Url  | 0  Link to this post | Bookmark this post with:        
 
Failed to render control: Value does not fall within the expected range.

Comments

Bookmark and Share

Note: Facebook no longer sends notifications for comments, so it may be a number of days before I see your post. For urgent matters, click "Contact Me" on the top nav. More info: Click Here.