Anyone know JAVA scripting? | FerrariChat

Anyone know JAVA scripting?

Discussion in 'Other Off Topic Forum' started by LetsJet, Feb 2, 2006.

This site may earn a commission from merchant affiliate links, including eBay, Amazon, Skimlinks, and others.

  1. LetsJet

    LetsJet F1 Veteran
    Owner

    May 24, 2004
    9,334
    DC/LA/Paris/Haleiwa
    Full Name:
    Mr.
    I've got a little problem

    PM me if you can help
     
  2. Schatten

    Schatten F1 World Champ
    Owner

    Apr 3, 2001
    11,237
    Austin, TX
    Full Name:
    Randy
    I don't believe you are looking for Java coding, but JavaScript specifically. You can find lots of resources or post here - with [ c o d e ] tags to tell us what you have and what you want to do. www.hotscripts.com has lots of resources on how to's / copy/pasting.
     
  3. LetsJet

    LetsJet F1 Veteran
    Owner

    May 24, 2004
    9,334
    DC/LA/Paris/Haleiwa
    Full Name:
    Mr.
    Well,


    I'm working on a website and saw one I liked so I used Download Studio to grab it. :) I use Adobe Golive and have changed everything but the js won't work correctly. I don't have any experience with js so I'm not having any luck figuring out what I did. It's basically mouse out / over routine and I think it can't find the images.

    Thanks for the website link I'll check it out for other issues.
     
  4. wax

    wax Five Time F1 World Champ
    Lifetime Rossa

    Jul 20, 2003
    52,382
    SFPD
    Full Name:
    Dirty Harry
    JAVA

    By wax

    ____________________

    INT. - KITCHEN - DAY

    LETSJET
    Makes coffee
    ____________________

    fin
     
  5. LetsJet

    LetsJet F1 Veteran
    Owner

    May 24, 2004
    9,334
    DC/LA/Paris/Haleiwa
    Full Name:
    Mr.
    WHAT?

    By LETSJET

    INT - Confused . com
     
  6. Schatten

    Schatten F1 World Champ
    Owner

    Apr 3, 2001
    11,237
    Austin, TX
    Full Name:
    Randy
    The .js file is just a javascript reference file. You can open it up in notepad. You can download it easily if you know how to as well. No additional tools are necessary. It is similar to having a separate .css file for cascading style sheets rather than including the css style sheet in the page itself. It helps for ease of global management, which is basically like an include file.

    Hope this helps.
     
  7. LetsJet

    LetsJet F1 Veteran
    Owner

    May 24, 2004
    9,334
    DC/LA/Paris/Haleiwa
    Full Name:
    Mr.

    I have it......... I've looked at it......... I can't figure out why it isn't working. I don't think it can find the images.
     
  8. Schatten

    Schatten F1 World Champ
    Owner

    Apr 3, 2001
    11,237
    Austin, TX
    Full Name:
    Randy
    open the js file in notepad, and paste it here, between code [] tags.
     
  9. wax

    wax Five Time F1 World Champ
    Lifetime Rossa

    Jul 20, 2003
    52,382
    SFPD
    Full Name:
    Dirty Harry
    That was a very, very, very, very short screenplay (script) for a very, very, very, very short film called "Java" ;)
     
  10. LetsJet

    LetsJet F1 Veteran
    Owner

    May 24, 2004
    9,334
    DC/LA/Paris/Haleiwa
    Full Name:
    Mr.
    // ============================================================================== //
    // NA_navMain() loops through #nav-main and sets all the ids and events needed //
    // for this navigation scheme to work properly. After setting all the proper ids //
    // and events, it calls NA_navMain_init() //
    // ============================================================================== //

    function NA_navMain() {
    // check to make sure this isn't opera 7
    if((window.opera && Math.round(navigator.appVersion.substring(0, 1)) > 7) || !window.opera) {
    if(document.getElementById("nav-main")) {
    // loop through all IMGs
    var els = document.getElementById("nav-main").getElementsByTagName("IMG");
    var counter = 0;
    for (var i=0; i<els.length; i++) {
    // top level IMGs only
    if (els.parentNode.parentNode.parentNode.parentNode.id == "nav-main") {
    // sets id of IMG
    els.id = "nav-main-img-" + counter;
    // sets id of parent LI - this can't be set via JS, if not present, nav won't show
    //els.parentNode.parentNode.id = "nav-main-li-" + counter;
    if (els.parentNode.parentNode.className != "hover") {
    // sets event of IMG
    els.onmouseover = function() {
    this.src = this.src.replace("-off", "-on").replace(".jpg", ".gif");
    this.parentNode.parentNode.className = "hover";
    }
    els.onmouseout = function() {
    this.src = this.src.replace("-on", "-off").replace(".gif", ".jpg");
    this.parentNode.parentNode.className = "";
    }
    }
    counter = counter+1;
    }
    }
    }
    }
    }

    addEvent(window, "load", NA_navMain);

    // ============================================================================== //
    // end navigation JS //
    // ============================================================================== //
     
  11. CornellCars

    CornellCars Formula 3

    Mar 24, 2005
    1,102
    South Florida
    Full Name:
    Jason
    Are you previewing the pages in explorer but on your local computer, or are you uploading them and checking them live/online? I had trouble with Dreamweaver on my local before I'd upload when I previewed because I would get a browser bar warning of "to help protect your security blah blah blah" which didn't allow my java rollovers to work. Once I disabled that (or better yet moved to firefox) the rollovers worked in the preview.
     
  12. LetsJet

    LetsJet F1 Veteran
    Owner

    May 24, 2004
    9,334
    DC/LA/Paris/Haleiwa
    Full Name:
    Mr.

    uploaded and live..........

    works of the other site so my browser setting should be right.
     
  13. Webby

    Webby F1 Veteran

    Sep 12, 2004
    6,821
    haha wax, I got it.
     
  14. djoex

    djoex Karting

    Dec 7, 2003
    139
    Miami, Fl
    Full Name:
    Joe Yeung
    could you post the html where you want to run this too? I need to see how nav-main is structured.. or in other words i want to see how the html looks like, in order to test it properly.
     
  15. LetsJet

    LetsJet F1 Veteran
    Owner

    May 24, 2004
    9,334
    DC/LA/Paris/Haleiwa
    Full Name:
    Mr.

    PM sent
     
  16. LetsJet

    LetsJet F1 Veteran
    Owner

    May 24, 2004
    9,334
    DC/LA/Paris/Haleiwa
    Full Name:
    Mr.
    Thank you Thank you

    I would not have solved it without all your help. I esp. want to that Joe for solving it. Yes, I needed to change some image names. (Don't know why as I didn't change the souce files)

    Oh and of course, the Academy................
     
  17. Schatten

    Schatten F1 World Champ
    Owner

    Apr 3, 2001
    11,237
    Austin, TX
    Full Name:
    Randy
    very glad you got it resolved!
     
  18. LetsJet

    LetsJet F1 Veteran
    Owner

    May 24, 2004
    9,334
    DC/LA/Paris/Haleiwa
    Full Name:
    Mr.

    Thanks

    I contacted Adobe last night and told them I just got CS2 Premium and did they have an "upgrade" path to Studio 8". I figured they must now that the own Macromedia............. Short answer - NO :(

    After just paying $500 for the upgrade I'm not paying $1000+ for that.....
     
  19. wax

    wax Five Time F1 World Champ
    Lifetime Rossa

    Jul 20, 2003
    52,382
    SFPD
    Full Name:
    Dirty Harry
    Congratulations - overnight, you've gone from:

    165 errors

    to

    9 errors
     
  20. LetsJet

    LetsJet F1 Veteran
    Owner

    May 24, 2004
    9,334
    DC/LA/Paris/Haleiwa
    Full Name:
    Mr.
    All but 2 are on line 267. That line was cut and paste from weather.com link engine.
     

Share This Page