Results 1 to 3 of 3

Thread: Gonna be bald before I figure out this script!!!

  1. #1
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Angry Gonna be bald before I figure out this script!!!

    Alrighty,
    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

    //==================================================================================================
    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("Organizations","");
    menu2.addItem("Manufacturing & Fabricating","");
    menu2.addItem("Vehicle Sales & Service","");
    menu2.addItem("Lodging","");
    menu2.addItem("Merchants & Shops","");
    menu2.addItem("Medical","");
    menu2.addItem("Services","");
    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

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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 -

    1:

    Code:
     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","");
    2:

    Code:
     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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Talking DUDE! You're my HERO!!!!!!!!

    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!!!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •