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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pop-up links to different target locations? 1

Status
Not open for further replies.

glenster

Programmer
Aug 27, 2001
3
US
Hi All,

New to Fireworks, and was wondering if I can get my pop-up menu links to open up in different target windows. Specifically, I'm trying to make the links open up in a new window (target="_blank"). Anyone know how to tweak the fw_menu.js file to make this happen? I'll gladly name my first kid after anyone who can help. =)

Thanks in advance,
Glenn
 
Hello glenster!

There are two ways:

1) do it when you create (or re-create) pop-up in FW.
Open "Set Pop-up Menu" window (click in the center of button > choose Add Pop-up Menu...). In teh righr top corner you'll see Target drop down menu. Select _blank.

2) do changes manually. But you should change not fw_menu.js but your HTML file which has pop-up menu. In the SCRIPT section on your page (should be in HEAD) you'll find function fwLoadMenus(). And do changes like shoen below:

function fwLoadMenus() {
if (window.fw_menu_0) return;
window.fw_menu_0 = new Menu("root",52,19,"Verdana, Arial, Helvetica, sans-serif",12,"#ffffff","#00538d","#00538d","#8ec6ec");
fw_menu_0.addMenuItem("aaa","window.open('file_path.htm', '_blank');");
fw_menu_0.addMenuItem("bbb","window.open('file_path.htm', '_parent');");
fw_menu_0.addMenuItem("ccc","window.open('file_path.htm', '_self');");
fw_menu_0.addMenuItem("ddd","window.open('file_path.htm', '_top');");
fw_menu_0.addMenuItem("eee","location='file_path.htm'");
fw_menu_0.hideOnMouseOut=true;


fw_menu_0.writeMenus();
} // fwLoadMenus()


In first 4 examples browser opens page using reserved target words, in last - just opens the page as usual (in the same window). Change it and you'll have what yuo need. I would personally choose first opportunity - rebiuld FW file and then re-export.

Good Luck!
 
Hi Eugene!

Thank you so much! I was trying to do it manually from the HTML file or the fw_menu.js file, since I don't have Fireworks yet. You may call my first son, Eugene... =P

Glenn
 
ahhhhh

but how do you specify a specific frame?

the frame is called newmain.htm...

how would I make the pages open in this frame?
 
Simply fill in the name of the frame:
fw_menu_0.addMenuItem("ddd","window.open('file_path.htm', 'frameName');");
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top