You must Sign In to post a response.
  • Category: JavaScript

    How to focus on parent window from Child window in Chrome

    Hi All,

    I need to show the parent window which is in back when click a link from child window in Chrome. I have used command window.parent.focus() but this is not working. This problem is in Chrome browser only.

    Please suggest me some workaround to achieve this.

    Thanks
  • #754974
    Chrome does not support this that's why you are facing this issue.

    set the name of the parent window and then try moving the ficus as below



    <script type="text/javascript">

    $(document).ready(function () {
    window.name = "parent";
    $('#link').click(function (event){
    event.preventDefault();
    window.open("child.html");
    });
    });
    </script>

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM


  • Sign In to post your comments