View Full Version : Gonna be bald before I figure out this script!!!

01-18-2006, 10:14 PM
Here's what I'm lookin at here... I'm building a site for the chamber of commerce of the town in which i live... Long story short they want each business member of the chamber to have thier own page, but all they want on that page is the business' name, address, and any other contact info; Sound like a waste of time and space to anyone else? I have gotten this idea approved by the person who hired me, but I can't figure out how to execute it... Here is a sample of the code for the menu I am working with... It's a Trans-Menu I found on www.Youngpup.net (http://www.youngpup.net)

var menu2 = ms.addMenu(document.getElementById("Members"));
menu2.addItem("Sports & Recreation", "");
menu2.addItem("Food & Convenience","");
menu2.addItem("Real Estate","");
menu2.addItem("Financial, Legal, & Insurance","");
menu2.addItem("Manufacturing & Fabricating","");
menu2.addItem("Vehicle Sales & Service","");
menu2.addItem("Merchants & Shops","");
menu2.addItem("Municipal & Utilities","");
menu2.addItem("Associate Members","");

var submenu1 = menu2.addMenu(menu2.items[0]);
submenu1.addItem("Blythes Scott Co. Museum","");
submenu1.addItem("Turkey Track Bluegrass Festival Park","");


Ok, I know you're thinking that looks fairly simple... and that part is... but what I am getting at is instead of every business that I add on here taking up an entire page just to put contact info... I was thinking maybe adding an event handler to each item on the submenu... like "onclick" functions that would open up a DHTML tooltip or even a simple alertbox that had the name of the business and the contact info of the business. I have tried it every which way i could imagine... and it always winds up make the entire script not work... If ANYONE has ANY ideas... I would be MORE than grateful. Thank you. Josh

01-19-2006, 05:41 AM
Well, often menu scripts of this type will allow HTML in the text field and/or javascript in the link field. Since I cannot find any clear documentation for your menu, I will assume that the field where you have titles for the items is the text field and that the blank one following that in each entry is the link field. If I am right about that and if either field allows what I suppose, one or both of these strategies should work -


var submenu1 = menu2.addMenu(menu2.items[0]);
submenu1.addItem("<span onclick=\"alert('This Works')\">Blythes Scott Co. Museum</span>","");
submenu1.addItem("Turkey Track Bluegrass Festival Park","");


var submenu1 = menu2.addMenu(menu2.items[0]);
submenu1.addItem("Blythes Scott Co. Museum","javascript:alert('That Worked')");
submenu1.addItem("Turkey Track Bluegrass Festival Park","");

If either of these two alerts fire when you click on 'Blythes Scott Co. Museum', then we at least have a starting pont.

01-19-2006, 05:50 AM
Thank you sooooo much man... I don't know why i didn't even think of that... using a span tag... that's so simple... but thank you sooo much... I was about ready to give this lady her deposit back and tell her to find someone else... cuz I was goin nutz! Thank you again! I can't say that enough. It worked... both of them... Sweet! Thanx!!!:D :D :D :D