ianswindale
11-23-2012, 07:54 AM
I got the following script for creating pop up boxes from the Internet -- the guy was offering it free, I didn't steal it. I am having a Firefox related problem with it. I ran it through the Firefox web console and it didn't report any problems. I'm hoping someone here might be able to help.
Basically I am using the same code for three different types of pop up boxes on my website. The first contains information, the second type contains a .gif or a .jpg of an archaeological site plan and the third type contains an embedded YouTube video. The first two open and stay on top. If I open one of these first and then open the pop up box with the embedded video it, too, stays on top. But if I open the pop up box with the embedded video first, then the pop up box opens but as soon as the video starts to load it disappears behind the browser. I need to get it to stay on top. Below I am including the javascript that I got off the guy's webpage. Then below that I am including that javascript with the changes I made. Basically I added <img src="video_icon.jpg" class="icon" border="0"> in place of words like the "Click me" in the original javascript because I wanted the link to be an icon not words. Also I added title="Click here to see video clip" so that anyone hovering over the icon can see this message. Finally I have put the part of the code between the script tags in the head part of the page, while I have put the ahref part at the appropriate point in the body. It doesn't make any difference if I move the script part to the body with the ahref part as the problem persists.
This link will take you to a page with links to all three pop up boxes. The video pop up box has a video camera icon. Please click this one first to see the problem. If you click one of the others first the problem won't appear.
http://www.uk.digiserve.com/mentor/minoan/pseira.htm
His javascript:
<script type="text/JavaScript">
function popjack()
{ window.open('misc/poppy2.html','popjack','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,cop yhistory=no,scrollbars=yes,width=480,height=480');
}
</script>
<a href="JavaScript: popjack()" onMouseOver="window.status='Status Bar Message';
return true" onMouseOut="window.status=''; return true">
Click Me<a>
My changed version of the javascript:
<script type="text/JavaScript">
function videobox()
{
window.open('pseira_video.htm','videobox','toolbar=no,location=no,directories=no,status=no,menubar=n o,resizable=yes,copyhistory=no,scrollbars=yes,width=900,height=500');
}
</script>
<a href="JavaScript: videobox()" title="Click here to see video clip" onMouseOver="window.status='Status Bar Message';
return true" onMouseOut="window.status=''; return true"> <img src="video_icon.jpg" class="icon" border="0"> </a>
Thanks
Ian Swindale
Basically I am using the same code for three different types of pop up boxes on my website. The first contains information, the second type contains a .gif or a .jpg of an archaeological site plan and the third type contains an embedded YouTube video. The first two open and stay on top. If I open one of these first and then open the pop up box with the embedded video it, too, stays on top. But if I open the pop up box with the embedded video first, then the pop up box opens but as soon as the video starts to load it disappears behind the browser. I need to get it to stay on top. Below I am including the javascript that I got off the guy's webpage. Then below that I am including that javascript with the changes I made. Basically I added <img src="video_icon.jpg" class="icon" border="0"> in place of words like the "Click me" in the original javascript because I wanted the link to be an icon not words. Also I added title="Click here to see video clip" so that anyone hovering over the icon can see this message. Finally I have put the part of the code between the script tags in the head part of the page, while I have put the ahref part at the appropriate point in the body. It doesn't make any difference if I move the script part to the body with the ahref part as the problem persists.
This link will take you to a page with links to all three pop up boxes. The video pop up box has a video camera icon. Please click this one first to see the problem. If you click one of the others first the problem won't appear.
http://www.uk.digiserve.com/mentor/minoan/pseira.htm
His javascript:
<script type="text/JavaScript">
function popjack()
{ window.open('misc/poppy2.html','popjack','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,cop yhistory=no,scrollbars=yes,width=480,height=480');
}
</script>
<a href="JavaScript: popjack()" onMouseOver="window.status='Status Bar Message';
return true" onMouseOut="window.status=''; return true">
Click Me<a>
My changed version of the javascript:
<script type="text/JavaScript">
function videobox()
{
window.open('pseira_video.htm','videobox','toolbar=no,location=no,directories=no,status=no,menubar=n o,resizable=yes,copyhistory=no,scrollbars=yes,width=900,height=500');
}
</script>
<a href="JavaScript: videobox()" title="Click here to see video clip" onMouseOver="window.status='Status Bar Message';
return true" onMouseOut="window.status=''; return true"> <img src="video_icon.jpg" class="icon" border="0"> </a>
Thanks
Ian Swindale