Results 1 to 5 of 5

Thread: Layered DHTML Windows

  1. #1
    Join Date
    May 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Layered DHTML Windows

    1) Script Title: Dynamic Window Widget (1.03)

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

    3) Describe problem:
    Opening an iFrame-type DHTML window inside an existing iFrame-type DHTML window limits size to "parent".


    Having previously posted about layering a number of Ajax-type DHTML windows.... thanks .... am now constrained in a couple of places needing to fire javascript onLoad - hence the need to switch to using iFrame-type DHTML windows instead (ho hum).

    The problem being that when a link from within an iframe-type DHTML window calls another iframe-type DHTML window, the size of the "child" is restricted to being a maximum of the "parent".

    Not a problem shared by ajax-type windows.

    Any ideas ? or is there a way to get onLoad to fire for an ajax-type DHTML?

    Thanks all

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well, you can launch an iframe from the top window from within an iframe. Once you are in an iframe, the top window is top or parent. The way this would work out with the widget script depends upon how you would want to do it though. As an example, once you have some iframe widget open on your page, from the page within that, if you wanted to open the Google iframe from the demo, you could do:

    Code:
    <a href="#" onclick="parent.googlewin.show(); return false">Show Window 1</a>
    You could also open an entirely new iframe on the parent from within an iframe like so:

    Code:
    <a href="#" onclick="parent.test2=parent.dhtmlwindow.open('testbox2', 'iframe', 'test2.htm', '#11: test2', 'width=250px,height=200px,resize=1,scrolling=1,left=20px,top=100px', 'recal');return false;">test 2</a>
    Last edited by jscheuer1; 07-03-2007 at 03:08 PM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    May 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    John,

    Not sure if I completely understand you..... or if it's just that I'm not being clear.

    I have an HTML page that includes the link....

    <a href="#" onClick="adminwin=dhtmlwindow.open('adminwin', 'iframe', 'admin.pl?competition_id=$competition_id&organisation_id=$organisation_id', 'Administration', 'width=300px,height=500px,resize=0,scrolling=1,center=1'); return false">Administration</a>

    Which pops up a iframe-type window.
    Within the "adminwin" is the link...

    <a href="#" style="text-decoration: none; color: black;" onClick="parent.adminwin.hide(); venueswin=dhtmlwindow.open( 'venueswin', 'iframe', 'venues.pl', 'Competition Venues', 'width=650px,height=400px,resize=0,scrolling=1,center=1'); return false;">Venues</a>

    The second layer is larger than the first layer.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Code:
    <a href="#" style="text-decoration: none; color: black;" onclick="parent.adminwin.hide(); parent.venueswin=parent.dhtmlwindow.open( 'venueswin', 'iframe', 'venues.pl', 'Competition Venues', 'width=650px,height=400px,resize=0,scrolling=1,center=1'); return false;">Venues</a>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    May 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up



    Super - Easy when you know how.

    Now, to crawl back under my rock......

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
  •