PDA

View Full Version : Resolved dhtmlwindow.open does not open a window



kwatts59
06-01-2017, 04:14 PM
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



<!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>

jscheuer1
06-01-2017, 05:28 PM
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:


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


to:


<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:


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.

kwatts59
06-13-2017, 06:00 PM
Thanks for your responses. I figured it out.