Context Menu in IFrame

3 posts, 1 answers
  1. Anthony
    Anthony avatar
    25 posts
    Member since:
    Oct 2008

    Posted 12 Nov 2008 Link to this post

    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. Answer
    Serrin
    Serrin avatar
    286 posts
    Member since:
    Sep 2008

    Posted 12 Nov 2008 Link to this post

    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?

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Anthony
    Anthony avatar
    25 posts
    Member since:
    Oct 2008

    Posted 14 Nov 2008 Link to this post

    Thank you Serrin, you really save my day.
Back to Top