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

RadMenu client-side runtime errors

0 Answers 106 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Ken
Top achievements
Rank 2
Ken asked on 09 Apr 2008, 06:16 PM
Using your tutorial I am trying to write a client-side event handler that is executed when the user clicks an item in the RadMenu.  As you can see below I am calling "OnClicking" script function when the "OnClientItemClicking" event occurs.  The problem is I get runtime errors when it is executed (see linked picture).  It says 'Item.NavigateUrl is null or not an object'.  Also, my Intellisense does not show the properties that you address in your examples (see linked picture).  It seems that 'eventArgs.Item.NavigateUrl' does not exist.  I am behind schedule and this is slowing me down even further.  We have purchased the Prometheus controls but I cannot find the original purchaser so I do not know our account number.  Can you tell me what I am doing wrong here?

My Javascript function:
function OnClicking(sender, eventArgs)  
            {           
                if (eventArgs.Item.NavigateUrl != "#")  
                {  
                    var proceed = confirm("Navigate to "+ eventArgs.Item.NavigateUrl + " ?");  
                    if (!proceed)  
                    {  
                        return false;  
                    }  
                }  
            } 

My RadMenu:
<telerik:RadMenu ID="RadMenu1" Runat="server" OnClientItemClicking="OnClicking" 
                    style="top: 0px; left: 11px; height: 23px; width: 200px" Skin="Telerik"   
                    Font-Size="Small">                      
                        <DefaultGroupSettings ExpandDirection="Auto" Flow="Vertical" Height="135px" /> 
                        <CollapseAnimation Duration="200" Type="OutQuint" />                      
                    <ExpandAnimation Type="OutQuart" /> 
                        <Items> 
                            <telerik:RadMenuItem Text="Channel 8" Runat="server" GroupSettings-Height="400">  
                                <GroupSettings Flow="Vertical" ExpandDirection="Auto" Height="400px">  
                                </GroupSettings> 
                            </telerik:RadMenuItem>    
                            <telerik:RadMenuItem Text="Channel 9" Runat="server" GroupSettings-Height="400">  
                                <GroupSettings Flow="Vertical" ExpandDirection="Auto" Height="400px">  
                                </GroupSettings> 
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem Text="Channel 10" Runat="server" GroupSettings-Height="400">  
                                <GroupSettings Flow="Vertical" ExpandDirection="Auto" Height="400px">  
                                </GroupSettings> 
                            </telerik:RadMenuItem>    
                            <telerik:RadMenuItem Text="Technet EDGE" Runat="server" GroupSettings-Height="400">  
                                <GroupSettings Flow="Vertical" ExpandDirection="Auto" Height="400px">  
                                </GroupSettings> 
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem Text="VisitMIX Online" Runat="server" GroupSettings-Height="400">  
                                <GroupSettings Flow="Vertical" ExpandDirection="Auto" Height="400px">  
                                </GroupSettings> 
                            </telerik:RadMenuItem>                          
                        </Items> 
</telerik:RadMenu> 

I could not attach the pictures so I have posted them at the urls below:

Runtime error pic
RadMenu Intellisense

Thanks much,
Ken

No answers yet. Maybe you can help?

Tags
Menu
Asked by
Ken
Top achievements
Rank 2
Share this question
or