Results 1 to 2 of 2

Thread: opening dhtmlwindow in parent from iframe

  1. #1
    Join Date
    Apr 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default opening dhtmlwindow in parent from iframe

    1) Script Title: dhtmlwindow.js

    2) Script URL (on DD): www.dynamicdrive.com

    3) Describe problem:



    I am trying to open a floating window in the parent from iframe.

    here is the code.

    here is the main page...

    <?php

    echo "Testing....";

    echo '
    <iframe name="mainwin" src ="http://www.mysalah.com/notice_master.php?id=ist"
    marginwidth=-50 marginheight=0 frameborder=0 width=167 height=312 scrolling="no" align="middle">
    </iframe>

    ';


    ?>


    here is notice_master.php

    <script type="text/javascript">
    var googlewin=dhtmlwindow.open("googlebox", "iframe", "http://mysalah.com/notice.php?id=$mosque", "mysalah", "width=700px,height=450px,resize=1,scrolling=1,center=1")
    </script>


    The floating window opens in IFRAME. How do i open it in the main window.


    Thanks,

    ismail

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    First, make sure DHTML window script is installed on your main page (contained in the main window). Then, inside the IFRAME page, to get a DHTML window to open on the main page, you'd modify your default code with something like:

    Code:
    var googlewin=parent.dhtmlwindow.open("googlebox", "iframe", "http://mysalah.com/notice.php?id=$mosque", "mysalah", "width=700px,height=450px,resize=1,scrolling=1,center=1")
    There are a few threads on this already actually, try doing a search.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •