PDA

View Full Version : DHTML Modal window: onclose



imvain2
06-05-2007, 07:37 PM
1) Script Title: DHTML Modal window

2) Script URL (on DD): DHTML Modal window (http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/dhtmlmodal.htm)

3) Describe problem: Onclose doesn't work for closing using close button

When the user clicks on the X button, the onclose function isn't "ran". At first I thought it was me for this is the same for the demo also.

imvain2
06-05-2007, 07:44 PM
I saw forceclose in modal.js, and I still can't get anything to work on bypass close.



function LoadMsg(){
msgwin = dhtmlmodal.open('msgbox', 'div', 'msgdiv', 'Attention', 'width=400px,height=200px,left=250px,top=110px,resize=0,scrolling=1');
return false;
msgwin.onclose=function(){
LoadResults();
}
msgwin.forceclose=function(){
LoadResults();
}
}
window.onload = LoadMsg;
function LoadResults(){
resultsURL = "showresults.php";
document.all.resultsframe.src=resultsURL;
alert(resultsURL);
}

imvain2
06-05-2007, 08:02 PM
Looking at: http://www.dynamicdrive.com/forums/showthread.php?t=18354&highlight=modal and can't get that to work.

imvain2
06-05-2007, 08:18 PM
I decided to cut my closes timewise and scrap this idea and go with another idea.