Object Expected Javascript Error Sharepoint
(עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeOnline20132010Other VersionsRelated ProductsLibraryForumsGallery Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Asked by: Object Expected - JavaScript error on SharePoint 2013 start page SharePoint > SharePoint 2013 - General Discussions and Questions Question 0 Sign in to vote Hi Community, we are having a SharePoint 2013 portal running to share documents and tasks among a larger team. The business users have to use IE8 on their corporate notebooks (Windows XP). Now we are facing the issue that some of them are getting a JavaScript error causing the SharePoint portal not to display any content. This error appears after entering credentials. The screen shows the known "Working on it..." and does never leave that state. (See screenshots below). I searched for that error and found some topics recommending to reset IE browser settings. Unfortunately this option is disabled due to corporate guidelines. Is there any other known workaround for that issue? Thanks a lot for your help, Matthias Wednesday, February 13, 2013 12:05 PM Reply | Quote All replies 0 Sign in to vote Hi Matthias, May be a problem with your IE settings. Please try to put your portal to Intranet Zone or trusted sites. Thursday, February 14, 2013 7:16 AM Reply | Quote 1 Sign in to vote Hi You need to enable xmlHTTP support as follows: IE >> Tools >> Internet Options >> Advance >> security >> Muss Native xmlHTTP support enabled sein Gruzz ATB Proposed as answer by Roger CormierMicrosoft employee Thursday, June 06, 2013 5:45 PM Tuesd
for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us SharePoint Questions Tags Users Badges Unanswered Ask Question _ SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top ExecuteOrDelayUntilScriptLoaded with sp.js when in debug mode Object Expected https://social.technet.microsoft.com/Forums/sharepoint/en-US/8062c45c-d5aa-4ca8-99a8-9aee4f27201e/object-expected-javascript-error-on-sharepoint-2013-start-page?forum=sharepointgeneral up vote 11 down vote favorite 2 I currently have a JavaScript file that gets loaded in my SharePoint pages. jQuery(document).ready(function() { ExecuteOrDelayUntilScriptLoaded(myfunction(), "sp.js"); }); myfunction = function(){ /*Do something here.*/ }; Now the JavaScript runs just fine, however on a list page, it prevents the ribbon from loading the List tab. In the console I get below error. SCRIPT5007: Object expected init.debug.js, line 5153 character 5 error. Even if I comment out http://sharepoint.stackexchange.com/questions/76370/executeordelayuntilscriptloaded-with-sp-js-when-in-debug-mode-object-expected all of the function so it looks exactly like above I still get the error message. I have noticed that if I change "sp.js" to "sp.debug.js" I do not get the error message. From looking at the scripts that are loaded on the page, this makes sense as sp.debug.js is loaded and not sp.js. I don't really want to put sp.debug.js in the javascript code as when it reaches production servers, they won't be using sp.debug.js. I've never notice this happen before with any code that has ExecuteOrDelayUntilScriptLoaded(jsfunction(), "sp.js"). Is there a way to get it to work for both environments like with a #ifdebug statement in javascript? Or some other idea. javascript jsom share|improve this question edited Feb 9 at 6:29 Asad Refai 3,63561435 asked Sep 3 '13 at 14:28 Cann0nF0dder 97421125 add a comment| 1 Answer 1 active oldest votes up vote 19 down vote accepted You are using ExecuteOrDelayUntilScriptLoaded wrong, you should use the function name, not execute it. Like this: jQuery(document).ready(function() { ExecuteOrDelayUntilScriptLoaded(myfunction, "sp.js"); }); Note that i removed the "()" from myfunction. Now it should work as expected share|improve this answer answered Sep 3 '13 at 16:54 Anders Aune 4,54511223 3 Thank you. School boy error! Glad you spotted it. Thanks. –Cann0nF0dder Sep 4 '13 at 9:51 add a comment| Y
Tips/Tricks Top Articles Beginner Articles Technical Blogs Posting/Update Guidelines Article Help Forum Article Competition Submit an article or http://www.codeproject.com/Questions/285320/JQuery-Object-Expected-Error tip Post your Blog quick answersQ&A Ask a Question View http://forums.asp.net/t/1423185.aspx?jQuery+and+Master+Pages+Object+expected Unanswered Questions View All Questions... Linux questions C# questions ASP.NET questions SQL questions fabric questions discussionsforums All Message Boards... Application Lifecycle> Running a Business Sales / Marketing Collaboration / Beta Testing Work Issues Design and Architecture ASP.NET JavaScript C / C++ / object expected MFC> ATL / WTL / STL Managed C++/CLI C# Free Tools Objective-C and Swift Database Hardware & Devices> System Admin Hosting and Servers Java .NET Framework Android iOS Mobile SharePoint Silverlight / WPF Visual Basic Web Development Site Bugs / Suggestions Spam and Abuse Watch features Competitions News The Insider Newsletter The object expected javascript Daily Build Newsletter Newsletter archive Surveys Product Showcase Research Library CodeProject Stuff communitylounge Who's Who Most Valuable Professionals The Lounge The Insider News The Weird & The Wonderful The Soapbox Press Releases Non-English Language > General Indian Topics General Chinese Topics help What is 'CodeProject'? General FAQ Ask a Question Bugs and Suggestions Article Help Forum Site Map Advertise with us About our Advertising Employment Opportunities About Us Ask a Question All Questions All Unanswered FAQ JQuery "Object Expected" Error Rate this: Please Sign up or sign in to vote. See more: C# ASP.NET jQuery hi, In my ASP.NET application. I have used JQuery Autocomplete for retrieving database values using Handlers(.ashx). Now the problem is, i used "UpdatePanel" to avoid flickering on Postback. Now those Autocomplete textbox are lost its JQuery reference on each Postback hence i need to rebind those textbox with the corresponding JQuery reference(From my previous post i g
ASP.NET Community Standup Forums Help Home/ASP.NET Forums/General ASP.NET/jQuery for the ASP.NET Developer/jQuery and Master Pages - Object expected jQuery and Master Pages - Object expected [Answered]RSS 7 replies Last post Dec 21, 2010 12:59 PM by WilliamSnell ‹ Previous Thread|Next Thread › Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Support Options Advanced Search Reply WilliamSnell Member 179 Points 569 Posts jQuery and Master Pages - Object expected May 14, 2009 03:30 PM|WilliamSnell|LINK Here is the layout of my problem: I have a Master Page that is referenced by pages in the root of my site, as well as some pages in an 'Admin' folder. All of that works just fine. I added some jQuery to add some features to an auto-search textbox, and placed the code referencing the jQuery file and the script in the head section of the Master Page. The script looks a little like this: $(document).ready(function() { $('#ctl00_MainNavigation1_SearchTextBox').click(function() { SelectText(this); // Function to call on click event. }); }); I just used the actual id generated by ASP.NET to grab the textbox to avoid the "what's the actual id?" issues. When the home page loads, all is well. When I try to navigate to one of the pages in the 'Admin' folder, I get an 'Object expected' error. At first I thought it was due to a possible renaming of my textbox, but I checked the source of the page and this was not the case. In fact, I removed all of the script code except the:$(document).ready(function() { });part, and the 'Object expected' error still occurs. I am only setting up the jQueryhere, and it still throws an exception.I have no idea what is causing this. I can ignore the error and continue, but then I lose the added functionality of my textbox. Ihave had issues in the past when referencing Flash movies in a Master Page file that didn't appear in pages contained within folders. I'm not sure if this could be the same type of problem. It's not how hard you push in life, but who you push, that makes the difference between success and running for your life. Reply rtpHarry All-Star 39506 Points 8949 Posts Re: jQuery and Master Pages - Object expected May 14, 2009 04:06 PM|rtpHarry|LINK Have you trie