close window

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
User avatar
Billywiz
 
 
Posts: 162
Joined: Thu Jul 17, 2008 3:32 pm
Location: UK
Contact:

close window

Post 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.
The Cheapest Car Hire, Worldwide.

Summit Car Hire
User avatar
Pablo
 
Posts: 21702
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: close window

Post by Pablo »

User avatar
Billywiz
 
 
Posts: 162
Joined: Thu Jul 17, 2008 3:32 pm
Location: UK
Contact:

Re: close window

Post 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"
The Cheapest Car Hire, Worldwide.

Summit Car Hire
User avatar
Pablo
 
Posts: 21702
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: close window

Post by Pablo »

Maybe you can use a dialog instead?
http://www.wysiwygwebbuilder.com/suppor ... orate.html
User avatar
Billywiz
 
 
Posts: 162
Joined: Thu Jul 17, 2008 3:32 pm
Location: UK
Contact:

Re: close window

Post by Billywiz »

Thanks, Ill give it a shot.
The Cheapest Car Hire, Worldwide.

Summit Car Hire
Post Reply