Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open new browser window from pop-up menu?

Status
Not open for further replies.

lizziebyrne

Technical User
Jul 7, 2003
19
0
0
GB
Hi there,

Can any one clear this up for me??
I'm trying to create a pop-up menu that opens a new browser window when you click the links.

So far I've created a pop-up menu in fireworks and exported the file to dreamweaver, where I've then searched through the code to find the best place to apply the open browser window code, but no joy.

 
You can do this easily in FW.

Basically what you need is to add 'target="_blank"' at the end of your <A> tag, for example.....

Code:
<A href="newpage.htm" target="_blank">Click Here</A>

In Fireworks you can specify this when you are setting up your PopUp menu. Each link that you specify can be assigned a Target Window.
 
Alternatively, if you don't want to redo your Fireworks file, you can make the alterations in Dreamweaver.

Code:
<!--
function mmLoadMenus() {
  if (window.mm_menu_0405084055_0) return;
  window.mm_menu_0405084055_0 = new Menu("root",53,20,"Verdana, Arial, Helvetica, sans-serif",14,"#9999cc","#000099","#ffffff","#ffffff","left","middle",3,0,500,-5,7,true,false,true,0,true,true);
  mm_menu_0405084055_0.addMenuItem("Link&nbsp;1","window.open('link1.htm', ]color red]'_blank');");
  mm_menu_0405084055_0.addMenuItem("Link&nbsp;2","window.open('link2.htm', [COLOR=red]'_self');");
   mm_menu_0405084055_0.hideOnMouseOut=true;
   mm_menu_0405084055_0.menuBorder=1;
   mm_menu_0405084055_0.menuLiteBgColor='#ffffff';
   mm_menu_0405084055_0.menuBorderBgColor='#555555';
   mm_menu_0405084055_0.bgColor='#555555';

  mm_menu_0405084055_0.writeMenus();
} // mmLoadMenus()

//-->
 
Error in my previous post : should be...

Code:
<!--
function mmLoadMenus() {
  if (window.mm_menu_0405084055_0) return;
  window.mm_menu_0405084055_0 = new Menu("root",53,20,"Verdana, Arial, Helvetica, sans-serif",14,"#9999cc","#000099","#ffffff","#ffffff","left","middle",3,0,500,-5,7,true,false,true,0,true,true);
  mm_menu_0405084055_0.addMenuItem("Link&nbsp;1","window.open('Link1.htm', ]color red]'_blank'[/color]);");
  mm_menu_0405084055_0.addMenuItem("Link&nbsp;2","window.open('Link2.htm', [COLOR=red]'_self'[/color]);");
   mm_menu_0405084055_0.hideOnMouseOut=true;
   mm_menu_0405084055_0.menuBorder=1;
   mm_menu_0405084055_0.menuLiteBgColor='#ffffff';
   mm_menu_0405084055_0.menuBorderBgColor='#555555';
   mm_menu_0405084055_0.bgColor='#555555';

  mm_menu_0405084055_0.writeMenus();
} // mmLoadMenus()

//-->

Hope that helps.
 
For the third and final time, this is what I meant to put in my post :
Code:
<!--
function mmLoadMenus() {
  if (window.mm_menu_0405084055_0) return;
  window.mm_menu_0405084055_0 = new Menu("root",53,20,"Verdana, Arial, Helvetica, sans-serif",14,"#9999cc","#000099","#ffffff","#ffffff","left","middle",3,0,500,-5,7,true,false,true,0,true,true);
  mm_menu_0405084055_0.addMenuItem("Link&nbsp;1","window.open('Link1.htm', [COLOR=red]'_blank'[/color]);");
  mm_menu_0405084055_0.addMenuItem("Link&nbsp;2","window.open('Link2.htm', [COLOR=red]'_self'[/color]);");
   mm_menu_0405084055_0.hideOnMouseOut=true;
   mm_menu_0405084055_0.menuBorder=1;
   mm_menu_0405084055_0.menuLiteBgColor='#ffffff';
   mm_menu_0405084055_0.menuBorderBgColor='#555555';
   mm_menu_0405084055_0.bgColor='#555555';

  mm_menu_0405084055_0.writeMenus();
} // mmLoadMenus()

//-->
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top