Iframes issue RRS feed

  • Question

  • User78494605 posted

    I have created populated two iframes parent and child both belongs to different aspx pages i need to change the border style of parent aspx page from child but i cant able to get parent iframe id in child.i need to change parent iframe border once child iframe is opened .I need to handle this in jquery kindly tell me the solution

    Friday, March 18, 2016 11:08 AM


  • User61956409 posted

    Hi pavi90,

    You could refer to the following sample to specify a border for parent iframe.

        Main Page
        <br />
        <iframe id="myiframe" src="ChildPage.aspx"></iframe>


    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
            function myfunction() {
                parent.document.getElementById("myiframe").style.border = "1px solid #ccc";
    <body onload="myfunction()">
        <form id="form1" runat="server">
                I'm Child Page

    Best Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 21, 2016 5:02 AM