Page 1 of 1

close window

Posted: Sun May 19, 2019 5:02 pm
by Billywiz
A simple enough question but I doubt there is a simple answer
I there a way to close a window that has not been opened by javascript in certain browsers.
I have a link coming from another site that opens a page with my cookie policy on it and I have put a "Close window" link but it doesn't close. I know that certain browsers do not allow a window to close unless its been opened by JavaScript and thought there might be a quick fix. is it possible to put some extra code into

Code: Select all

<link rel="stylesheet" type="text/css" href="//wpcc.io/lib/1.0.2/cookieconsent.min.css"/><script src="//wpcc.io/lib/1.0.2/cookieconsent.min.js"></script><script>window.addEventListener("load", function(){window.wpcc.init({"border":"normal","corners":"large","colors":{"popup":{"background":"#cff5ff","text":"#000000","border":"#5e99c2"},"button":{"background":"#5e99c2","text":"#ffffff"}},"content":{"message":"We use some unobtrusive cookies to ensure you get the best experience from the website.","link":"Our Cookie Policy","href":"https://www.summitcarhire.com/cookies.html","button":"OK Got It"},"position":"top","padding":"none","fontsize":"tiny"})});</script>
to make it open in the same window as the link.

Re: close window

Posted: Sun May 19, 2019 5:52 pm
by Pablo

Re: close window

Posted: Sun May 19, 2019 6:12 pm
by Billywiz
OK Pablo, I didn't think there would be a simple answer.
Would it not be possible in the code above that opens the page in a "new window" to make it open in the "same window" so that on the page I could put "Back to Home page"

Re: close window

Posted: Sun May 19, 2019 7:57 pm
by Pablo
Maybe you can use a dialog instead?
http://www.wysiwygwebbuilder.com/suppor ... orate.html

Re: close window

Posted: Mon May 20, 2019 8:14 am
by Billywiz
Thanks, Ill give it a shot.