473,692 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp.net 2.0 menu client script error '0.cells null'

Hi all,

We're currently developping an asp.net 2.0 project, and ran into a
problem with the new menu control.

At the first load of the page, no errors are generated, but after a
first postback an error pops up when hovering over a menu item:

"Error: '0.cells' is null or not an object"

the error is located in the client script function
function Menu_HideItems( items) {}

for(i = 0; i < rows[0].cells.length; i++) {
in this line the length of the rows array = 0, what generates an error.
the rows array should give the menu row, what fails here. A wrong item
is considered as the menu, and therefore gives an error.

When searching deeper it seems that the function

Has anyone had this kind of error with the menu control?
The controls' viewstate is enabled, that cannot be the problem.

Can I change the clientscript that is generated by the menu control to
avoid this error?

If anyone can help, that would be great!

tnx in advance,

Kind Regards,

Koen Appeltans

Jan 16 '06 #1
1 1712
We are also getting the same error. This is our situation and how it

Our web application uses an asp.net 2.0 menu and sitemap for navigation.
The page has an asp.net 2.0 treeview control on it. The data in the tree
view is built on the fly. A dhtml behavior is used to keep the selected item
in the treeview in about the middle of the screen(vertical ly). An Iframe is
used to display information about the item selected in the treeview or pages
selected from the menu.

the menu behaves as expected until the following conditions are met:
1 the mouse has been passed over the menu,
2 any item on the treeview is selected or expanded.
3 the mouse is pased over the menu again

We have noticed that the menu repositions itself 3px to the right of the
original position just before the above problem manifests.

The menu's will all drop down and will not disappear until the next
postback. The menu's will continue to lock down if the mouse is passed over
them until the page is refreshed.

The client scripting error that appears is "0.Cells is null or not an object"

Here is the page aspx:
<asp:Panel id="PanelMenu" style="width: 840px; position: absolute; top:
64px; z-index: 5; left: 101px; height: 15px; background-color: transparent;"
<asp:menu id="MenuHSNOCer tifications" runat="server"
datasourceid="S iteMapDataSourc e1" orientation="Ho rizontal"
staticdisplayle vels="2" style="z-index: 1; position: absolute;"
disappearafter= "-1" enabletheming=" False">
<staticmenustyl e backcolor="Tran sparent" bordercolor="#7 39574"
horizontalpaddi ng="5px" borderstyle="No ne" borderwidth="1p x"
cssclass="HSNOM enu" />
<staticmenuitem style cssclass="HSNOM enu" />
<dynamicmenusty le backcolor="Tran sparent" bordercolor="#7 39574"
borderstyle="Do tted" borderwidth="1p x" cssclass="HSNOM enu" />
<dynamicmenuite mstyle horizontalpaddi ng="10px"
verticalpadding ="2px" cssclass="HSNOM enu" />
<statichoversty le backcolor="Whit e" font-underline="True "
cssclass="HSNOM enu" />
<dynamichoverst yle cssclass="HSNOM enu" font-underline="True " />
<staticselected style cssclass="HSNOM enu" />
<dynamicselecte dstyle cssclass="HSNOM enu" />
<asp:sitemapdat asource id="SiteMapData Source1" runat="server" />

<asp:TreeView ID="TreeViewHSN OLocations" runat="server"
NodeIndent="5" AutoGenerateDat aBindings="fals e" EnableTheming=" false"
PopulateNodesFr omClient="False " style="width: 240px; height: 520px; z-index:
1; position: absolute; top:97px; left:10px;" nodewrap="True"
cssclass="Scrol lingPanel" enableclientscr ipt="False">
<hovernodesty le forecolor="Cade tBlue" />
<selectednodest yle forecolor="Blue " />

<iframe id="FrameRight " name="FrameRigh t" runat="server" scrolling="no"
style="position :absolute; top:100px; left:256px; width:724px; height: 520px;
background-color: transparent; z-index: 3;" frameborder="0" ></iframe>
Thanks in advance
Feb 21 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Gary Varga | last post by:
In the file WebUIValidation.js, when a postback that doesn't fail the validation has a javascript error saying summary is undefined in the ValidationSummaryOnSubmit function. Page_ValidationSummaries has a length of 1 but there are no array entries. This is the line that fails: summary.style.display = "none";
by: Chad | last post by:
Hi, I have the following server code that attaches a client side script to the Update command of the data grid. Private Sub clientExc_ItemCreated(ByVal sender As Object, _ ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles clientExc.ItemCreated If e.Item.ItemType = ListItemType.EditItem Then CType(e.Item.Cells(4).Controls(0),
by: Guy Debord | last post by:
Hello all, I know that this is a long shot, but I have a problem which someone reading this group *may* just be able to shed some light on. We have a new internal personnel planner/attendance system in place. It uses a web interface to allow members of staff to select their site location for any week, request leave and record absences. The server-side scripting is composed of VB/ASP and Javascript which
by: lourivas | last post by:
Hi, I create a class with a property called MyProperty that needs to register a client script if the value is set to true. When i change the property value to true i always receive a message "Property value is not valid/Object reference not set to an instance of an object". I'm using VS 2005. What i'm missing? see:
by: Sid | last post by:
I am getting the following client error when I am having ASP.NET 2.0 menu with the Smartnavigation property set to true. "Error: '0.cells' is null or not an object" This error does not occur when Smartnavigation=false Can anyone suggest me a solution or a fix if its exists?
by: Velislav | last post by:
Hi, I have a client script block, which is registered in my Page_Load. However a button may result in the need to change the script which I've registered. Obviously the OnClick event occurs after Page_Load, so calling RegisterClientScriptBlock with the same key does nothing.
by: Bjorn Sagbakken | last post by:
Hello I have just migrated from VS 2003 to VS 2005, and .NET framework 1.1 to 2.0 I am at the end of debugging and fixing stuff. Now there is one error I just cannot find a solution to: On some pages I have applied a small client-script to trap the enter-key beeing pressed and re-route this action. With the new version this little script still works, it traps the enter-key. BUT it causes postback-errors on many other .NET control,...
by: =?Utf-8?B?TG93bGFuZGVy?= | last post by:
Hello, I've built a web application that uses client script callbacks. It is used on a large network with a large variety of user OSes and IE versions. It was tested on IE 6 on different setups and IE 5.5 to a lesser degree without problems. I know of a least one user who gets an error in WebResource.axd when using the application. The same error also occurs on a simple reproduction page with just a button and a div. When the button...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.