Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Wednesday July 18 2012 - 06:07:37
pop up window in the menu
Poster: Ludus
Dated: Sunday May 26 2002 - 21:28:27 BST
Hi,
I need to open a pop up with the menu, but I'm not able to do it...
May I get a help, please?
See below an example:
addmenu(menu=["Arte",
,,95,1,"",style1,,"left",effect,,,,,,,,,,,,
,"Disegni","disegni.htm",,,1
,"Web Art","webart.htm",,,1
,"Backgrounds","back.htm",,,1
])
"Web Art" is the page to open as pop up.
Thanks in advance.
Regards,
Ludus
Poster: wpatters1229
Dated: Thursday May 30 2002 - 21:05:13 BST
Here is an example of a menu line that calls a javascript function that you place in the header of your page:
Here is the menu line in the array file;
,"For the Doctor","javascript:openMeFortheDoctor()",,"Information for Doctors",1
Here is the javascript you need in the header of the page.
<SCRIPT LANGUAGE="javascript">
function openMeFortheDoctor()
{
window.open('http://www.fragilex.org/html/4thedoctor.htm','','toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,left=25,top=15,width=560,height=300')
}
</SCRIPT>
Just replace the url that I use with the url of the page you want to show in the popup. You can also change any of the variables that define width and height etc.. If you just want to open a new window, just add the tag to the url as target=new. You can do that right on the menu URL area and not even use all this script.