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

Context Menu in IFrame

2 Answers 80 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 1
Anthony asked on 12 Nov 2008, 08:39 PM
When I click a menu item on Context Menu in IFrame, it will change IFrame url instead of the main page url. Is there a way to change main page url?
 <asp:UpdatePanel ID="UpdatePanel2" runat="server">  
            <ContentTemplate> 
                <asp:Panel ID="cpbMainContextMenu" runat="server">   
                    <telerik:RadContextMenu ID="MainContextMenu" runat="server" Width="100%" ExpandDelay="0" 
                        OnClientShowing="OnContextMenuClientShowing" OnClientItemClicked="MenuClicked" 
                        CausesValidation="False" OnPreRender="MainContextMenu_PreRender">  
                        <Targets> 
                            <telerik:ContextMenuDocumentTarget /> 
                            <telerik:ContextMenuControlTarget ControlID="ContentPlaceHolder1" /> 
                        </Targets> 
                        <Items> 
                            <telerik:RadMenuItem Value="miPatient_NameMCM" runat="server">  
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem Value="miPatient_DemoMCM" Text="Demographics/Visits" 
                                runat="server">  
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem Value="miPatient_AllergiesMCM" Text="Allergies" 
                                runat="server">  
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem Value="miPatient_MedicationsMCM" Text="Home/Current Medications" runat="server">  
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem Value="miPatient_ConditionsMCM" Text="Med Hx/Phys Exam" 
                                runat="server">  
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem Value="miPatient_PastSurgicalHxMCM" Text="Surgical History" runat="server">  
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem Value="miPatient_DiagnosisCodesMCM" Text="Diagnosis Codes" 
                                runat="server">  
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem Value="mi_ProcedureNameMCM" Text="[PROCEDURENAME]" Enabled="False" runat="server">  
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem Value="miProcedure_EditProcedureMCM" Text="Primary" runat="server">  
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem Value="miProcedure_AddSurgicalProcsMCM" Text="Additional Procedures" runat="server">  
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem Value="miProcedure_DrugsMCM" Text="Prescribed Drugs" 
                                runat="server">  
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem Value="miProcedure_AddStaffMCM" Text="Staff" 
                                runat="server">  
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem Value="miProcedure_PreOpMCM" Text="Pre-Op" 
                                runat="server">  
                                <Items> 
                                    <telerik:RadMenuItem Value="miProcedure_PreOp_PatientInfoMCM" Text="Patient Info" runat="server">  
                                        <Items> 
                                            <telerik:RadMenuItem Value="miProcedure_PreOp_PatientInfo_DemographicsMCM" Text="Demographics" runat="server">  
                                            </telerik:RadMenuItem> 
                                            <telerik:RadMenuItem Value="miProcedure_PreOp_PatientInfo_VisitMCM" Text="Visit" runat="server">  
                                            </telerik:RadMenuItem> 
                                            <telerik:RadMenuItem Value="miProcedure_PreOp_PatientInfo_ReadinessMCM" Text="Readiness" runat="server">  
                                            </telerik:RadMenuItem> 
                                        </Items> 
                                    </telerik:RadMenuItem> 
                                    <telerik:RadMenuItem Value="miProcedure_PreOp_ProcedureInfoMCM" Text="Diagnosis and Procedure" runat="server">  
                                        <Items> 
                                            <telerik:RadMenuItem Value="miProcedure_PreOp_ProcedureInfo_PrimaryProceduresMCM" 
                                                Text="Primary" runat="server">  
                                            </telerik:RadMenuItem> 
                                            <telerik:RadMenuItem Value="miProcedure_PreOp_ProcedureInfo_AdditionalProceduresMCM" 
                                                Text="Additional Procedures" runat="server">  
                                            </telerik:RadMenuItem> 
                                            <telerik:RadMenuItem Value="miProcedure_PreOp_ProcedureInfo_DrugsMCM" Text="Prescribed Drugs" runat="server">  
                                            </telerik:RadMenuItem> 
                                            <telerik:RadMenuItem Value="miProcedure_PreOp_ProcedureInfo_StaffMCM" Text="Staff" runat="server">  
                                            </telerik:RadMenuItem> 
                                            <telerik:RadMenuItem Value="miProcedure_PreOp_ProcedureInfo_LocationHxMCM" Text="Location Hx" runat="server">  
                                            </telerik:RadMenuItem> 
                                        </Items> 
                                    </telerik:RadMenuItem> 
                                    <telerik:RadMenuItem Value="miProcedure_PreOp_VitalsHxMCM" Text="Vitals &amp; NPO Status" runat="server">  
                                    </telerik:RadMenuItem> 
                                    <telerik:RadMenuItem Value="miProcedure_PreOp_LabsMCM" Text="DocuLabâ„¢" 
                                        runat="server">  
                                        <Items> 
                                            <telerik:RadMenuItem Value="miProcedure_PreOp_Labs_CurrentLabsMCM" Text="Current Labs" runat="server">  
                                            </telerik:RadMenuItem> 
                                            <telerik:RadMenuItem Value="miProcedure_PreOp_Labs_LabHxMCM" Text="Lab Hx" 
                                                runat="server">  
                                            </telerik:RadMenuItem> 
                                        </Items> 
                                    </telerik:RadMenuItem> 
                                    <telerik:RadMenuItem Value="miProcedure_PreOp_AllergiesMCM" Text="Allergies" 
                                        runat="server">  
                                    </telerik:RadMenuItem> 
                                    <telerik:RadMenuItem Value="miProcedure_PreOp_HomeMedsMCM" Text="Home/Current Medications" runat="server">  
                                    </telerik:RadMenuItem> 
                                    <telerik:RadMenuItem Value="miProcedure_PreOp_AnesthesiaHxMCM" Text="Family Anesthesia Hx" runat="server">  
                                    </telerik:RadMenuItem> 
                                    <telerik:RadMenuItem Value="miProcedure_PreOp_SurgicalHxMCM" Text="Surgical Hx" 
                                        runat="server">  
                                    </telerik:RadMenuItem> 
                                    <telerik:RadMenuItem Value="miProcedure_PreOp_ConditionsMCM" Text="Med Hx/Phys Exam" runat="server">  
                                    </telerik:RadMenuItem> 
                                    <telerik:RadMenuItem Value="miProcedure_PreOp_AnesthesiaPlanMCM" Text="Anesthesia Plan" runat="server">  
                                    </telerik:RadMenuItem> 
                                    <telerik:RadMenuItem Value="miProcedure_PreOp_RiskMCM" Text="Risk/Comments" 
                                        runat="server">  
                                    </telerik:RadMenuItem> 
                                </Items> 
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem Value="miLogout_LogoutMCM" Text="Logout" 
                                runat="server">  
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem runat="server" Value="miLogout_CloseBrowserMCM" Text="Close Browser">  
                            </telerik:RadMenuItem> 
                        </Items> 
                        <CollapseAnimation Duration="200" Type="OutQuint" /> 
                    </telerik:RadContextMenu> 
               </asp:Panel> 
            </ContentTemplate> 
        </asp:UpdatePanel> 

Thanks,

Anthony Wang

2 Answers, 1 is accepted

Sort by
0
Accepted
Serrin
Top achievements
Rank 1
answered on 12 Nov 2008, 09:34 PM

Hey Anthony,

 

Without knowing what you're doing for your clicked code, I just tried this from within an iFrame, as as long as the target was going to _parent, it reloaded the parent page just fine.  Does your logic allow for setting a target when you respond to the click event?

0
Anthony
Top achievements
Rank 1
answered on 14 Nov 2008, 04:14 PM
Thank you Serrin, you really save my day.
Tags
Menu
Asked by
Anthony
Top achievements
Rank 1
Answers by
Serrin
Top achievements
Rank 1
Anthony
Top achievements
Rank 1
Share this question
or