Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:03
Popup assistance needed
Poster: fredlongworthhighschool
Dated: Friday October 17 2003 - 8:57:27 BST
On my website I use the following bit of code to throw up a pop-up window:
Code:
<!-- Open photo in new window -->
<!-- Opens photo in its raw image format -->
<script language="JavaScript">
function openPhoto(imgSrc,imgWidth,imgHeight,strCaption){
var leftPosition = (screen.width-imgWidth)/2;
var topPosition = (screen.height-imgHeight)/2-25;
objImage = window.open("", "_blank","width="+imgWidth+",height="+imgHeight+",left="+leftPosition+",top="+topPosition);
objImage.document.open();
objImage.document.write("<html><head><title>"+strCaption+"</title><meta http-equiv=\"imagetoolbar\" content=\"no\"></head><body bgcolor=\"#000000\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" onLoad=\"javascript:focus();\" onBlur=\"javascript:window.close();\"><img src=\""+imgSrc+"\" width=\""+imgWidth+"\" height=\""+imgHeight+"\" alt=\""+strCaption+"\"></body></html>");
objImage.document.close();
}
openPhoto('images/webuse_notice.gif',570,250,'Important Notice');
</script>
<!-- Opens photo in its raw image format -->
<script language="JavaScript">
function openPhoto(imgSrc,imgWidth,imgHeight,strCaption){
var leftPosition = (screen.width-imgWidth)/2;
var topPosition = (screen.height-imgHeight)/2-25;
objImage = window.open("", "_blank","width="+imgWidth+",height="+imgHeight+",left="+leftPosition+",top="+topPosition);
objImage.document.open();
objImage.document.write("<html><head><title>"+strCaption+"</title><meta http-equiv=\"imagetoolbar\" content=\"no\"></head><body bgcolor=\"#000000\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" onLoad=\"javascript:focus();\" onBlur=\"javascript:window.close();\"><img src=\""+imgSrc+"\" width=\""+imgWidth+"\" height=\""+imgHeight+"\" alt=\""+strCaption+"\"></body></html>");
objImage.document.close();
}
openPhoto('images/webuse_notice.gif',570,250,'Important Notice');
</script>
The thing is I don't know how to put this option in where I click on a submenu item.
Thanks
Andy
EDIT: Added following...
I'm looking into using an IFRAME to see if this will do the job.