Object Expected Error In Asp.net Menu
ASP.NET Community Standup Forums Help Home/ASP.NET Forums/General ASP.NET/ASP.NET AJAX + Ajax Control Toolkit/ASP.Net 2.0 Javascript "Object Expected" error ASP.Net 2.0 Javascript "Object Expected" error [Answered]RSS 4 replies Last post Jun 07, 2009 02:40 PM by jitumandalia ‹ Previous Thread|Next Thread › Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Support Options Advanced Search Related Links GuidanceVideos Reply jitumandalia Member 10 Points 76 Posts ASP.Net 2.0 Javascript "Object Expected" error May 15, 2009 08:17 PM|jitumandalia|LINK Hi Friends, I am getting javascript error "Object Expected" when I click on button on my home page, which causes AJAX post back. I went through many discussions but could not get any solution yet. I tried debugging the javascript in VS2008 and found that it always throws this error on ASP.Net menu items. Though it stops on the line which itselft is just a HTML code. I dont know why. It goes through below code each time I debug and executes a._webRequest.completed(Sys.EventArgs.Empty); as last statement before it throws error. After this statement it goes to the menu item, shown within
a Question Need help? Post your question and get tips & solutions from a community of 418,604 IT Pros & Developers. It's quick & easy. ASP 2.0 Menu Control and javascript error when placed on a master P: n/a Onur Hi, I have placed a
Tips/Tricks Top Articles Beginner Articles Technical Blogs Posting/Update Guidelines Article Help Forum Article Competition Submit an article or tip Post your Blog quick answersQ&A Ask a Question View Unanswered Questions View All Questions... Linux questions C# http://www.codeproject.com/Questions/375953/Superfish-menu-with-MVC-Issue-Object-Expected-err questions ASP.NET questions SQL questions fabric questions discussionsforums All Message Boards... Application Lifecycle> Running http://sagistech.blogspot.com/2010/07/aspnet-error-object-expected.html a Business Sales / Marketing Collaboration / Beta Testing Work Issues Design and Architecture ASP.NET JavaScript C / C++ / 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 object expected Site Bugs / Suggestions Spam and Abuse Watch features Competitions News The Insider Newsletter The 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 object expected error Help Forum Site Map Advertise with us About our Advertising Employment Opportunities About Us Ask a Question All Questions All Unanswered FAQ Superfish menu with MVC3 Issue (Object Expected error) Rate this: Please Sign up or sign in to vote. See more: ASP.NET jQuery Errors MVC3 Hi, I have a site which is an ASP.Net MVC3 Web Application. Since I needed sub-menus, I decided to use the SuperFish plugin. I downloaded the code, and added to my menu the sub-menues using, of course, the ul class="sf-menu". When I get to me home page (Which is the Index.cshtml), everything is ok (probably since it's my home page and the JavaScripts was loaded once). When I try to load a different page I get an error (Object Expected) on the JQuery function. If I delete this function, I don't get an error but it's as if the SuperFish CSS file is not loaded and the menu appears as a TreeView. I tried to google the issue and found some answers in which putting the JQuery function after a PlaceHolder should resolve the problem. I tried and it didn't. Now I get the Object Expected error also when loading my home page. The code as it is now: might give you ideas how to solve similar issues of ("Object Expected" with ScriptResource.axd). The easiest way to solve it is to use Firefox & firebug to trace down the specific JavaScript line which cause the problem.In the scenario bellow a resource (JavaScript) could not be loaded by the browser because the clock on the computer was set back in time. This caused this problem in another JavaScript (missing definition) which caused the error message to pop-up.Step by step how I traced down the problem:1. When running an ASP.NET site with Menu item I got the "Object expected" error with the following information: "ScriptResource.axd". When I clicked the detailed information it gave me the URL of the resource which cause the problem.Bottom line:* This error is a result of an unspecified JavaScript Error which accrued during running of a JavaScript file embedded in an ASP.NET project.* Verify you can open the JavaScript URL using the browser.* Debug the page using Firebug (on Firefox), see (2)2. When opening the page in Firefox with Firebug and setting the Firebug "console" to "enabled" (with "Show JavaScript errors") it caught the following exception:"WebForm_GetElementByTagName is not defined"The function "WebForm_GetElementByTagName" is declared in an embedded resource called: "WebForms.js", which is in many cases the first Java script included in an HTML generated by an ASP.NET page.Searching about this error online yielded only the following result:http://forums.asp.net/p/1439101/3253854.aspxButtom line:* Try to open in the browser each and every JavaScript include files (.AXD) in the page.3. The error I got when I've tried to open the first ".AXD" JavaScript include file was - Parameter: "utmDate" out of range/out of date - which basically pointed me to check the computer date, since I've taken it back in time.Setting the date forward again fixed my problem. Labels: ASP.NET 1 comment: Eran Smith said... Programmers have the edge of developing programs that much faster than any language. .net obfuscator October 16, 2011 at 11:20 PM Post a Comment Newer Post Older Post Home Subscribe to: Post Comments (Atom) Blog Archive ► 2016 (1) ► July (1) ► 2015 (4) ► December (1) ► June (1) ► April (1) ► January (1) ► 2014 (3) ► November (1) ► September (1) ► April (1) ► 2013 (9) ► December (3) ► May (2) &