Results 1 to 2 of 2

Thread: Link between dhtml windows

  1. #1
    Join Date
    Aug 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Link between dhtml windows

    1) Script Title: DHTML Window widget (v1.03)

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...ndow/index.htm

    3) Describe problem:

    Is it possible to control properties of a window from another window, e.g. a link clicked in a window load a page in another?

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

    Default

    Yep, inside the first window, you'd have something like this:

    Code:
    <a href='javascript:parent.testwin2.load("iframe", "anotherpage.htm", "New Page Title")'>Load a Page</a>
    Where testwin2 is the variable name you assigned to the second window when you opened it, and assumed to be an iframe window, something like:

    Code:
    var testwin2=dhtmlwindow.open("testbox", "iframe", "apage.htm", "Page Title", "width=590px,height=350px,resize=1,scrolling=1,center=1", "recal")
    If the second window is of another type (ie: ajax), your link would instead be:

    Code:
    <a href='javascript:parent.testwin2.load("ajax", "anotherpage.htm", "New Page Title")'>Load a Page</a>

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
  •