January 6, 200917 yr this code i've written works in explorer, but not in any other browsers ive tested it in (firefox etc) <p><a href="website.com" target="_blank" value="Close this window" onclick="self.close()" >For more detailed information</a></p> it is supposed to work is when people want brief information, they click on a link which produces a pop-up window, within that pop-up is the above code. What i want to happen is you click on the 'for more detailed information' link and the pop-up closes and a new window opens with the detailed information to see what i mean its on this page http://www.grooming-health.com/zdesign.htm if you click on the 'our promise button' you'll see what i mean can anybody tell me why its only working in explorer thanks
January 12, 200917 yr Author bump if anybody know why its not working and how i fix it, it would be a great help thanks Seth
January 12, 200917 yr Hi Seth, The close functionality in firefox is disabled for security reasons, by default. You can change it in settings by setting ”dom.allow_scripts_to_close_windows” to true but obviously this is good for your remote users. Your problem is one many face however there is not a solution that I'm aware of. The rule firefox and many other browsers now go by is you can only close a window with JavaScript that you opened with JavaScript. If your visitor opened the window then you can't close it. Cheers,
Create an account or sign in to comment