Is this Java or JavaScript?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JhonAndrew
    New Member
    • Dec 2011
    • 3

    Is this Java or JavaScript?

    I've got this code from this site.

    Code:
    var btnTitleChange = $.button("Let's change Frame title").on_click(changeTitle,"Wow, I changed!");
    var frame = $.frame("Demo Application")
      .layout($.layout("table",[[20,-1,20],[20,40,10,-1,20]]))
      .add($.button("About").on_click(alert),"1,1")
      .add(btnTitleChange,"1,3");
    frame.show();
    function changeTitle(title){frame.title(title);}
    function alert(){js.alert("Welcome to JavaScript executable!");};
    I'm just a new developer and I wonder if it is really a JavaSript or Java?

    Where can I get tutorials for this programming language?

    ...hoping for your replies. :]
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    The site says javascript. W3Schools has a good tutorial.

    Comment

    • JhonAndrew
      New Member
      • Dec 2011
      • 3

      #3
      Originally posted by Rabbit
      The site says javascript. W3Schools has a good tutorial.
      Thanks for your reply Sir. Yes, the site say's it's JavaScript but I am getting confused as it needs Java. Then is the code
      Code:
      $.frame(), .layout(), $.button()
      isn't a JavaScript?

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        That's javascript. Java is required because it's being used as the compiler/interpreter.

        Comment

        • JhonAndrew
          New Member
          • Dec 2011
          • 3

          #5
          Originally posted by Rabbit
          That's javascript. Java is required because it's being used as the compiler/interpreter.
          Thanks a lot for the quick reply and the time you spare to my questions.. :D

          I just have 1 more question to ask. I tried looking at Google and also searched W3Schools but i still can't find any codes used in this script:

          Code:
          var btnTitleChange = $.button("Let's change Frame title").on_click(changeTitle,"Wow, I changed!");
          var frame = $.frame("Demo Application")
            .layout($.layout("table",[[20,-1,20],[20,40,10,-1,20]]))
            .add($.button("About").on_click(alert),"1,1")
            .add(btnTitleChange,"1,3");
          frame.show();
          function changeTitle(title){frame.title(title);}
          function alert(){js.alert("Welcome to JavaScript executable!");};

          Comment

          • Rabbit
            Recognized Expert MVP
            • Jan 2007
            • 12517

            #6
            And you're not going to. Those are functions created for their framework. You first need to know javascript before you can learn the framework.

            Comment

            • johny10151981
              Top Contributor
              • Jan 2010
              • 1059

              #7
              Need to Ask to Rabbit

              What is that mean That's javascript. Java is required because it's being used as the compiler/interpreter.

              Comment

              • Rabbit
                Recognized Expert MVP
                • Jan 2007
                • 12517

                #8
                The code that the user writes is JavaScript. The program that interprets the code uses Java.

                Comment

                • elishajava
                  New Member
                  • Dec 2011
                  • 1

                  #9
                  I think you need some foundation work before starting on anything complicated. Check out the tutorials using google and free sites like javabeginner.co m and you will be fine after practicing

                  Comment

                  • computerfox
                    Contributor
                    • Mar 2010
                    • 276

                    #10
                    You can tell if it's JavaScript by how it calls a new variable-"var"

                    Also, check for a line that says "<script type='text/javascript'>"

                    Comment

                    Working...