window.close() HEADACHE
I'm having an issue with a simple javascript.
I have 5 html pages all the same except different videos embedded. Each page links to the other pages and all pages have this code:
<a href="javascript :window.close();">Close</a>
This works fine when the page first opens.
The problem is when from the first page you click on one of the links and it loads, then the "close" button doesn't function.
I'm not a developer and don't know much JS. Does anybody know what's going on here? It's driving me nuts.
Thanks in advance
Here's a link so you can see what I'm talking about :
www.aninconvenienttax.com/video1.html
See if this works better. JavaScript doesn't run properly from the href attribute.
<a href="#" onclick="window.close();return false;">Close</a>
Stephen
It could be that when you click a link in the pop up window, and the page loads, the current page you are looking at didn't open the pop up window and browsers now prevent you from closing a window using JavaScript which JavaScript did not open.
Yeah, the original page is opened from a flash ActionScript, getURL("http://......");
The thing is, when the page is first called by the AS the JS "close" works fine.
So how do you close a window not opened by JS?
If you want to close a window with JavaScript then you must open it from JavaScript.
Stephen
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks