Results 1 to 3 of 3

Thread: dhtmlwindow.open does not open a window

  1. #1
    Join Date
    Aug 2015
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default dhtmlwindow.open does not open a window

    To people,
    I am having problems opening a window using the dhtmlwindow widget. The code was taken directly from the www.dynamicdrive.com example.
    Below is a link to the HTML script and the actual script.
    Any suggestions would be greatly appreciated.
    Thanks,
    Ken

    Script: DHTML Window widget
    carlos2.bmi.emory.edu/test_window.html


    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Shen Lab of Bioinformatics and Molecular Biology at UNLV</title>
    
    <link rel="stylesheet" href="windowfiles/dhtmlwindow.css" type="text/css" />
    <script type="text/javascript" src="windowfiles/dhtmlwindow.js">
    /***********************************************
    * DHTML Window Widget- © Dynamic Drive (www.dynamicdrive.com)
    * This notice must stay intact for legal use.
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    </script>
    
    </head>
    <body>
    
    <a href="#" onClick="yahoowin=dhtmlwindow.open('yahoo', 'iframe', 'http://yahoo.com', 'Yahoo', 'width=500px,height=300px,center=1'); return false">Show Yahoo</a>
    
    </body>
    </html>

  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

    When this script was written, Yahoo allowed itself to be displayed in an iframe. It no longer does. Bing is a site that still allows display in iframe. Try changing this part:

    Code:
    <a href="#" onClick="yahoowin=dhtmlwindow.open('yahoo', 'iframe', 'http://yahoo.com', 'Yahoo', 'width=500px,height=300px,center=1'); return false">Show Yahoo</a>
    to:

    Code:
    <a href="#" onClick="bingwin=dhtmlwindow.open('bing', 'iframe', 'http://bing.com', 'Bing', 'width=500px,height=300px,center=1'); return false">Show Bing</a>
    There could also be other problems. But if the window popped up OK and was blank, this should fix it.

    The browser cache may have to be emptied and/or the page refreshed to see changes.

    Added later by another frequent contributor:

    Quote Originally Posted by molendijk View Post
    Your web page takes too long to load so I can't test it. If the issue is that Yahoo doesn't show in an iframe then this is not a bug in the script. Yahoo simply doesn't allow their page to be shown in an iframe.
    I had the same problem loading your page as Arie (molendijk) did. So we are both just guessing here, but I think we probably have it, unless you also have other issues.
    Last edited by jscheuer1; 06-02-2017 at 01:04 AM. Reason: combine similar posts
    - John
    ________________________

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

  3. #3
    Join Date
    Aug 2015
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your responses. I figured it out.

Similar Threads

  1. dhtmlwindow.open() doesn't display scrollbars on ipad, iphone or itouch
    By chai4life in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 03-01-2013, 09:15 AM
  2. parent.dhtmlwindow.open div not working
    By antonyf in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 01-15-2012, 08:35 AM
  3. dhtmlwindow.open if else linking
    By tooletime in forum PHP
    Replies: 2
    Last Post: 10-14-2010, 08:02 PM
  4. window.open->getElementById.open
    By Kofgarter in forum JavaScript
    Replies: 6
    Last Post: 02-03-2009, 07:21 AM

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
  •