PDA

View Full Version : CGI/Javascript conflict



elbalazo
02-28-2006, 10:50 PM
Hi, I have a cgi form script that is supposed to forward the user to a thank you page. At the bottom of the page, I put in a simple javascript:window.close() to exit the window. The problem is that the javascript works fine on it's own, but if the page is forwarded to from the cgi script, the javascript will not work. Is this a common conflict? How is it resolved?

jscheuer1
03-01-2006, 07:08 AM
I'm not sure of the particulars here or if this would apply but, javascript cannot close a window that wasn't opened using javascript. If this is the case, it wouldn't simply not work though, there would be a confirmation dialogue box asking if you want to allow the window to close.