View Full Version : How to get working extra close-button on popup?

09-22-2014, 10:41 AM

I use the dd-DHTML Window widget (v1.1) for my popups. My problem is to get the popup closed. I have two buttons aside of each other, one to get back, the other to close the pop up. These two in this specific way construct the basic yes or no question of the popup. Hence, the X-mark in the upper right corner may stay where it is and work.

I am using the following lines of code inside the popup:

<div id="somediv" style="display:none"><p class="popup2">Text</p>
<input type="button" value="Terug" onclick="history.go(-1);" />
<input type="button" value="Verder" onclick="close()" />

<script type="text/javascript">
var googlewin=dhtmlwindow.open("divbox", "div", "somediv", "Welkom", "width=400px,height=150px,resize=0,scrolling=0,center=1", "recal")

The first button works well, the second fails. Is there anybody who can tell me what to put in the onclick="close()" line? I tried everything there. Many thanks!


09-22-2014, 04:50 PM
googlewin.close(), perhaps?

09-22-2014, 05:36 PM
Ha ha ha, I rejected a view on Feijenoord-Ajax yesterday trying almost all combinations with close, googlewin, () and other variables, feeling it must be easy but lacking the necessary knowledge. You're completely right. It works. Thank you very much.


09-22-2014, 06:09 PM
Feijenoord was the better team.