Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
245
Find parent webtab
posted

<asp:Label id="lblOne" runat="server" text="start here"/>


<ig:WebTab ID="WebTab1" runat="server" Height="700px" Width="100%">
<PostBackOptions EnableLoadOnDemand="true" EnableAjax="true" />
<ClientEvents SelectedIndexChanging="WebTab1_SelectedIndexChanging" />
<Tabs>
<ig:ContentTabItem runat="server" ScrollBars="Hidden" Key="General" Text="General" ContentUrl="management_general.aspx">                
</ig:ContentTabItem> 
<ig:ContentTabItem runat="server" ScrollBars="Hidden" Key="Offices" Text="Offices" ContentUrl="management_offices.aspx">                
</ig:ContentTabItem>
</Tabs> 
</ig:WebTab>


The above webtab is on management.aspx. From tab item management_general.aspx I need to be change the text of the label lblOne. Is this possible.

Parents
No Data
Reply
  • 1080
    Offline posted

    Hello,

    Thank you for posting in our community.

    What I can suggest is to use cross-origin communication between window objects. By calling the window's postMessage function from the iFrame and then listening to that message on the parent document, should resolve your issue.

    management_general.aspx

    <script>
    	function changeLabel() {
    		window.top.postMessage('message', location.origin);           
    	}
    </script>

    management.aspx

    <script>
    	window.addEventListener('message', function (e) {
    		var label = document.getElementById('<%= lblOne.ClientID %>');
    		label.innerHTML = "changed"
    	}, false);
    </script>

    I have created and attached a sample for your reference. Let me know if it helps you to achieve your requirements.

    0243.Sample.zip

Children