This is a migrated thread and some comments may be shown as answers.

[Solved] Object Expected Javascript Error From RadMenu

4 Answers 182 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 22 May 2009, 05:53 PM
I am promoting a website from my local machine to my development testing environment and get the following javascript error from the radmenu when the page finishes loading:

"Object Expected"

This prevents the submenu items from being displayed. 

When debugging the page using VS2008 it appears that the following line from a dynamic ScriptResource.axd file is causing the error:

this._expandAnimation=new Telerik.Web.UI.Animation Settings({});  

I am using the 2008.03.1105.35 version of the Web.UI dll.

Any ideas on how I can fix this issue?

4 Answers, 1 is accepted

Sort by
0
PureCode
Top achievements
Rank 2
answered on 23 May 2009, 12:27 PM
Jason,

The line of code you provide is the initialization code called by the page upon creation of the menu.

Are you sure there is a space between "Animation" and "Settings"? My Q1 2009 Web.UI does not have a space between those words (and a space there would, indeed, bomb out nicely, but i doubt that would throw an "object expected" error, although with javascript you never know).

However, that'd have blow up on your local machine as well. Did you push the Telerik DLLs to your testing environment as well?

One thing you can try is to turn off the 'EmbeddedScripts' for the RadMenu (on the testing environment), put a reference to the script file itself (came with the Telerik installation, it is called 'RadMenuScripts.js') in the script manager on the page so that it loads it from disk instead of from the assembly. This allows you to directly debug the javascript that is normally embedded.

A bit more than just the above is needed to get that all rolling, see this page for a lot more information regarding using external scripts instead of the embedded ones.

We don't develop anything without tossing the embedded scripts out the door for a while and use the external scripts exclusively, since it makes it a lot easier to debug client-side code.

Besides that, a suggestion might be (if possible), to upgrade to the 2009 Q1 SP1 (and shortly, SP2), which has a LOT of bug fixes as compared to your version.

Regards,

Mike
0
Jason
Top achievements
Rank 1
answered on 26 May 2009, 12:50 PM
Yeah, don't know why the space shows up when I paste the javascript line but it isn't there.

I did copy everything from my local machine so all I can think is that there is a setting on the server that is either conflicting with the telerik control or missing that the control wants to use.

I had a previous version (2008.02.0826.20) that worked properly, but this new version is throwing the error.  Did something change between Q2 and Q3 that might now require something set specifically on the webserver?

Jason
0
Jason
Top achievements
Rank 1
answered on 26 May 2009, 01:42 PM
Well, I've narrowed it down to something on the DEV server causing the error and not the DLL.  The code works fine on my QA environment.  Any clues as to what I should have my sysadmins look for?

Jason
0
Atanas Korchev
Telerik team
answered on 27 May 2009, 08:55 AM
Hi Jason,

We are not sure where this error comes from. Since it appears only on your server you can check for failing web resources. Please review this blog post for more info.

Regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Menu
Asked by
Jason
Top achievements
Rank 1
Answers by
PureCode
Top achievements
Rank 2
Jason
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or