I just looked at the examples but they don’t seem to do what I need (or rather needed because I am coming to accept that it is either impossible or very difficult.
These popups are part of full pages. I need them to close when a visitor clicks on the adverts WHEN IT IS A POP, but NOT CLOSE when the page is accessed directly, i.e. full page
is this possible?
Maybe I did not understand your examples too well. I’m on my way out, I will lok at them later this evening~~thanks
I have not gone through the new code exhaustively, but if I only touch the script and not the html and delete the
the popup goes up to the top left hand corner, forcing me to replace the deleted code and using the coordinates to get the popup in the centre . I did not need this before,
I noticed that you added
<!--************************ added to make javascript work *****************************-->
<div id="left"></div><div id="right"></div><div id="box4"></div><div id="head"></div>
<div id="nav"></div><div id="horizontal2"></div><div id="footer"></div><div id="header"></div>
<!--**************************************************************************************-->
It does not seem to be needed to get the popups to work. Was this only for your example?
That was for the popups
Now, if I simply paste the popup url into the address bar I get the full page. If I then press the advert link the new page opens as it should leaving my page below. Good! But…the IE11 panel is still telling me that
“the webpage you are viewing is trying to close the page”, as before
I do not know where you got or from whom you got…
newwindow.moveTo(0,0);
newwindow.focus();
…but both lines cause script errors.
That is why they were commented out…
Be aware that “newwindow” is just the name of the window not the object itself, and
is used in the script to test whether the window was opened by javascript or not…
if(window.name=='newwindow') {
If you do not want the window moved to the top left, then just remove the…
window.moveTo(0,0);
Question Two
Answer Two
The javascript has…
var left=document.getElementById('left');
var right=document.getElementById('right');
var box4=document.getElementById('box4');
var head=document.getElementById('head');
var nav=document.getElementById('nav');
var horizontal2=document.getElementById('horizontal2');
var footer=document.getElementById('footer');
…and will throw errors if those elements are not in the HTML.
<a id="logo-close" href="someOtherPage.html" target="blank" title="go to page three">
<img src="http://pintotours.net/Pinto/images/tinyLogo.png" alt="tiny logo">
</a>
…is actually required in the HTML to prevent further script errors.
Just place the full url in the address bar in IE11 and the press the bottom link, and then close that page. My page should stay (it does) but I want to get rid of the box, as per my first post in the thread.
This might have to do with the way the link is redirected…
…and where did the extra Pinto Tours logo come from…?
have you ever considered a hobby other than coding.
It’s a shame, but you really do not seem to have a natural talent for it.
Are you absolutely certain about that?
If you go to line #443 of your ParaPalma.html file you will find this gem…
<a id="logo-close" href="/request/index.php?id=Pinto" onClick='setTimeout("self.close();",1)' target="_blank">
…which is guaranteed to produce the “Windows Internet Explorer” dialogue box.
Snipping required, go for it.
Well, I certainly did not put it there.
Is it possible that you may have had a hand in it?
Re the “trying to close” dialog
AFAIK this is because JavaScript is trying to close a window that was not opened by JavaScript
I believe part of the problem is because you are not using pop-ups for temporary “help info” type of stuff hat would be read and closed, but for what should be pages in their own right, or perhaps in show-hide toggles. but not pop-ups
Sorry, which one? You seem to always have one or more you’re working on.
(the whac-a-mole effect as result of working per page but evaluating per site. IMHO a templating system or at least include()s would help)