Results 1 to 4 of 4

Thread: DHTML window widget get title in iframe page

  1. #1
    Join Date
    Jun 2007
    Posts
    18
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default DHTML window widget get title in iframe page

    1) Script Title: Dynamic Drive DHTML window widget

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/

    3) Describe problem:

    I have created an iframe popup window using this script, and basically i want to create a function in the js file so i can access the popups title in the iframe page...

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

    Default

    is the ifreme page of the same domain as the parent page launching the DHTML window? Also, by access the title, do you mean store it in a variable, or use it somewhere as part of the window's interface?
    DD Admin

  3. #3
    Join Date
    Jun 2007
    Posts
    18
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default

    I figured it out

    I just changed the following in the dhtmlwindow.load function

    Code:
    window.frames["_iframe-"+t.id].location.replace(contentsource)
    TO

    Code:
    window.frames["_iframe-"+t.id].location.replace(contentsource+'?title='+title)
    then accessed it in php on the iframe page


    but I have one more question how would i go about minimizing and restoring the window using a button

    basically I have added some code to add a button to my menu and i want it to hide/show the window onclick how would i do this

    This is the code i tried but it doesn't seem to work:
    Code:
    var fishEyeElement = document.getElementById('fishEye');
    
    fishEyeElement.innerHTML = fishEyeElement.innerHTML + '<li id="fisheye_'+t+'"><a class="dockItem" onclick="if(document.getElementById(\''+t+'\').style.display == \'none\') { dhtmlwindow.restore(\'Minimize\', \''+t+'\'); }else{ dhtmlwindow.minimize(\'Restore\', \''+t+'\') }"><img src="images/dock/'+t+'.png" alt="Home" title="Example&nbsp;1" /></a></li>'

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

    Default

    Per this post, to create a link that restores a DHTML window, try the syntax:

    Code:
    <a href="#" onClick="dhtmlwindow.minimize(googlewin.controls.firstChild, googlewin)">Minimize Window</a>
    where "googlewin" in the above case is the variable assigned to the DHTML window when you opened it. For a restore link, the following should do it:

    Code:
    <a href="#" onClick="dhtmlwindow.restore(googlewin.controls.firstChild, googlewin)">Minimize Window</a>
    DD Admin

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
  •