Results 1 to 4 of 4

Thread: Not imortant but for my learning.

  1. #1
    Join Date
    Jul 2005
    Location
    cali
    Posts
    95
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking Not imortant but for my learning.

    I know this isn't very important, but in the script below, why are the object stated twice?(highlighted) throughout the whole script. I am just trying to understand the script a little better, so if you know hit me up!

    menu = new Menu();
    menu.addItem("webmasterid", "Web Building Sites", "Web Building Sites", null, null);
    menu.addItem("newsid", "News Sites", "News Sites", null, null);
    menu.addItem("freedownloadid", "Free Downloads", "Free Downloads", null, null);
    menu.addItem("searchengineid", "Search Engines", "Search Engines", null, null);
    menu.addItem("miscid", "Miscellaneous", "Miscellaneous", null, null);

    menu.addSubItem("webmasterid", "Dynamic Drive", "Dynamic Drive", "http://www.dynamicdrive.com/", "");
    menu.addSubItem("webmasterid", "JavaScript Kit", "JavaScript Kit", "http://www.javascriptkit.com/", "");
    menu.addSubItem("webmasterid", "Web Review", "Web Review", "http://www.webreview.com/", "");
    menu.addSubItem("webmasterid", "Freewarejava.com", "Freewarejava.com", "http://www.freewarejava.com/", "_blank");
    menu.addSubItem("webmasterid", "Web Monkey", "Web Monkey", "http://www.webmonkey.com/", "_blank");

    menu.addSubItem("newsid", "CNN", "CNN", "http://www.cnn.com", "");
    menu.addSubItem("newsid", "ABC News", "ABC News", "http://www.abcnews.com", "");
    menu.addSubItem("newsid", "MSNBC", "MSNBC", "http://www.msnbc.com", "");
    menu.addSubItem("newsid", "CBS news", "CBS News", "http://www.cbsnews.com", "");
    menu.addSubItem("newsid", "News.com", "News.com", "http://news.com", "");
    menu.addSubItem("newsid", "Wired News", "Wired News", "http://www.wired.com", "");
    menu.addSubItem("newsid", "TechWeb", "TechWeb", "http://www.techweb.com", "");

    menu.addSubItem("freedownloadid", "Dynamic Drive", "Dynamic Drive", "http://www.dynamicdrive.com/", "");
    menu.addSubItem("freedownloadid", "Download.com", "Download.com", "http://download.com/", "");
    menu.addSubItem("freedownloadid", "Tucows", "Tucows", "http://tucows.com/", "");

    menu.addSubItem("searchengineid", "Yahoo", "Yahoo", "http://www.yahoo.com/", "");
    menu.addSubItem("searchengineid", "Google", "Google", "http://www.google.com/", "");
    menu.addSubItem("searchengineid", "Excite", "Excite", "http://www.excite.com", "");
    menu.addSubItem("searchengineid", "HotBot", "HotBot", "http://www.hotbot.com", "");

    menu.addSubItem("miscid", "Cnet", "Cnet", "http://www.cnet.com/", "");
    menu.addSubItem("miscid", "RealAudio", "RealAudio", "http://www.realaudio.com/", "");
    menu.addSubItem("miscid", "MP3.com", "MP3.com", "http://www.mp3.com/", "");

    menu.showMenu();
    }

  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

    My guess is that they represent two different parameters that in each case, in this example, the author chose to be the same. For instance, one could be 'text to display' and the other could be 'title text for mouseover tip' (similar to behavior of the the alt attribute in IE with images). It has been my experience that these menus that have this sort of configuration syntax also come with well commented configuration files that explain this and much more. There usually is also an extensive tutorial page in the distribution that covers the options in greater detail.
    - John
    ________________________

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

  3. #3
    Join Date
    Jul 2005
    Location
    cali
    Posts
    95
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    After running a few tests, the first is the text to be displayed, and the second is the hint or description that is revealed when mouse hovers.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    A.K.A. the tooltip.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •