Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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>

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.


Poster: Hergio
Dated: Friday October 17 2003 - 15:53:56 BST

Code:
aI("text=See Photo1;url=javascript:openPhoto('image.gif',300,300,'Fun Photo');;");


This work?


Poster: fredlongworthhighschool
Dated: Friday October 17 2003 - 16:31:57 BST

It did! Thanks Dave. I had to put the function immediately before the Milonic calls.