java help

Discussion in 'OT Technology' started by DigiCrime, Mar 10, 2004.

  1. DigiCrime

    DigiCrime If Only!

    Joined:
    Oct 25, 2001
    Messages:
    33,001
    Likes Received:
    101
    Location:
    St. Louis
    How can I set these up to do one of two things, open into a new window, and open into a target frame

    a link to an example im working on
    http://www.stlhosting.com/100megs/index1.html

    My code
    Code:
    function showToolbar()
    {
    // AddItem(id, text, hint, location, alternativeLocation);
    // AddSubItem(idParent, text, hint, location);
    
    // Main menu
            menu = new Menu();
            menu.addItem("homeid", "Home", "Home", "http://stlhosting.com", null);
            menu.addItem("newsid", "Tools", "Tools", null, null);
            menu.addItem("systemsid", "Systems", "Systems", null, null);
            menu.addItem("servicesid", "Services", "Services", null, null);
    
    // Tools Menu
            menu.addSubItem("systemsid", "DNS Report", "DNS Report",  "http://www.dnsreport.com");
            menu.addSubItem("systemsid", "DNS Stuff", "DNS Stuff",  "http://www.dnsstuff.com");
            menu.addSubItem("systemsid", "Easy WHOIS", "Easy WHOIS",  "http://www.easywhois.com");
            menu.addSubItem("systemsid", "100megs Traffic", "100megs Traffic",
    "");
    
    
    // Services
    
            menu.addSubItem("servicesid", "Web Designing", "Web Desigining",  "http://www.yaaxy.com");
            menu.addSubItem("servicesid", "Weather", "Weather",  "http://www.weather.com");
    
    
            menu.showMenu();
    }
    
     
  2. aphoric

    aphoric Even if god did exist, it would be necessary to ab

    Joined:
    Aug 29, 2003
    Messages:
    918
    Likes Received:
    0
    Location:
    Leaving Afghanistan
    That's not Java...
     
    Last edited: Mar 10, 2004
  3. choler

    choler New Member

    Joined:
    May 21, 2002
    Messages:
    183
    Likes Received:
    0
    In u're menu.js file
    Code:
    function addSubItem(idParent, text, hint, location, target)
    
    &
    
    if (n)  MENUitem = "<tr><td><a class=clsMenuItemNS title='"+hint+"' href='"+location+"' target='"+target+"'>"+text+"</a><br></td></tr>\n";
    	if (ie) MENUitem = "<tr><td><a class=clsMenuItemIE title='"+hint+"' href='"+location+"' target='"+target+"'>"+text+"</a><br></td></tr>\n";
    
    and in u're menucontext.js
    Code:
    // Tools Menu
    	menu.addSubItem("systemsid", "DNS Report", "DNS Report",  "http://www.dnsreport.com","_blank");
    	menu.addSubItem("systemsid", "DNS Stuff", "DNS Stuff",  "http://www.dnsstuff.com","_blank");
    	menu.addSubItem("systemsid", "Easy WHOIS", "Easy WHOIS",  "http://www.easywhois.com","_blank");
    	menu.addSubItem("systemsid", "100megs Traffic", "100megs Traffic", "","_blank");
    
    
    // Services
    
    	menu.addSubItem("servicesid", "Web Designing", "Web Desigining",  "http://www.yaaxy.com","_blank");
    	menu.addSubItem("servicesid", "Weather", "Weather",  "http://www.weather.com","_blank");
    
     
  4. DigiCrime

    DigiCrime If Only!

    Joined:
    Oct 25, 2001
    Messages:
    33,001
    Likes Received:
    101
    Location:
    St. Louis
  5. Leb_CRX

    Leb_CRX OT's resident terrorist

    Joined:
    Apr 22, 2001
    Messages:
    39,994
    Likes Received:
    0
    Location:
    Ottawa, Canada
    java != javascript
     
  6. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,923
    Likes Received:
    11
    Location:
    Los Angeles
    Java must be compiled to machine code before it can be executed. Javascript is interpreted by the browser.

    Two completely different things.
     
  7. choler

    choler New Member

    Joined:
    May 21, 2002
    Messages:
    183
    Likes Received:
    0
    DigiCrime - all you did was change the menucontext.js... you also have to make the changes (I already mentioned) to the menu.js script file...

    Leb_CRX, kingtoad - nice echo guys... :rolleyes:
     
  8. panzerfaust

    panzerfaust New Member

    Joined:
    Oct 13, 2003
    Messages:
    1,604
    Likes Received:
    0
    Location:
    Far far away

    :nono: Java compiles to byte code and is then interpreted by the VM
     
  9. Leb_CRX

    Leb_CRX OT's resident terrorist

    Joined:
    Apr 22, 2001
    Messages:
    39,994
    Likes Received:
    0
    Location:
    Ottawa, Canada
    did anyone mention that Java is NOT the same as javascript?

    :o
     
  10. aphoric

    aphoric Even if god did exist, it would be necessary to ab

    Joined:
    Aug 29, 2003
    Messages:
    918
    Likes Received:
    0
    Location:
    Leaving Afghanistan
    read the first response...
     
  11. Leb_CRX

    Leb_CRX OT's resident terrorist

    Joined:
    Apr 22, 2001
    Messages:
    39,994
    Likes Received:
    0
    Location:
    Ottawa, Canada
    :eek3: :eek3: :eek3: :eek3:

    :ugh: :ugh:
     

Share This Page