This course will become read-only in the near future. Tell us at community.p2pu.org if that is a problem.

Task Discussion


  • algotruneman   Sept. 9, 2013, 11:08 a.m.

    Joining the "JavaScript, Javascript, javascript, Jscript, ECMAScript" progamming  jungle.

    First Exercise

  • Deb on the Web   March 17, 2013, 11:25 p.m.

    Here is the link to my results from the "Practical First Exercise." If only it was always this simple smiley. Best wishes to all!

  • Irene Moghis   Oct. 25, 2012, 4:41 p.m.

    First exercise done... Click Here

  • ERIC$$$   Oct. 5, 2012, 10:43 a.m.

    Here is a link to my "Practical First Exercise", comments are appreciated!

  • gspprog   Aug. 3, 2012, 6:53 a.m.
    function hello(name) { e=document.getElementById(name); e.innerHTML=" Javascript is Fun"; }
  • Andre Dublin   Aug. 3, 2012, 7:26 a.m.
    In Reply To:   gspprog   Aug. 3, 2012, 6:53 a.m.

    Hey gspprog, great first example.  Here are some pointers:

    Your going to want to declare variables with the var statement inside and outside of functions like so:

    function hey() {
      var e = stuff;
    }
    

    Why...because without the var statement that variable will become whats called a global variable and all other functions will be able to see that variable.  Think how that would affect a larger program if we use the 'e' var multiple times.  Things would be real messy.

  • PoweredByLinux   July 25, 2012, 10:56 p.m.

    Hello, I am PoweredByLinux.

    Here is a link to my "Practical First Exercise"!

  • Sinsedrix   May 18, 2012, 3:54 p.m.

    Hello, I'm Sinsedrix !

    Here is my "Practical First Exercise".

  • Vita   May 18, 2012, 5:46 a.m.

    Hello, I am Vita and this is my first task here. http://jsfiddle.net/JE4mD/2/

  • lramos82   Aug. 4, 2011, 2:52 p.m.

    Hello Everyone here is the link to my "Practical First Exercise"

    http://jsbin.com/ificu5/96

     

    Have a great Day

  • Eva   Aug. 1, 2011, 10:01 p.m.
  • Ikarus   July 30, 2011, 8:38 p.m.

     

    http://p2pu.code1011.com/

     

    thar you go

  • Chris Keller   July 28, 2011, 9:33 p.m.

    Greeting... Jumping into this... Practical First Exercise is here.

    Chris K.

  • Anonym   July 28, 2011, 7:06 p.m.

    <completed>Practical First Exercise</completed>

    http://www.rickmarkus.com/test/javascript.html

  • Anonym   July 4, 2011, 4:45 p.m.

    Here is my first attempt at javascript

     

    https://github.com/DamionKing/P2PU/blob/master/JS/JS101.html

  • boobaloo   July 5, 2011, midnight
    In Reply To:   Anonym   July 4, 2011, 4:45 p.m.

    Wesley,

    115 * 4 - 4 + 88 / 2 = 500, because multiplication and dividing have higher privilege, than addition and substraction.
    So we have:
    1. 115*4=460
    2. 88/2=44
    3. 460+44-4=500
    
    Simple enough :)
    
  • Brendan   June 7, 2011, 8:43 p.m.

    A reading recommendation in the process of posting the exercise.

    http://bit.ly/kL2C1t

  • Sedmikrasky   May 24, 2011, 4:51 p.m.

    I try to do this task:  Put up a minimalistic (bit of html/css) web page somewhere and include the "Hello, I'm a program" example from the "What is Javascript" Task.

    Post a link to your site in here so that people may view the source and comment.

    Here's the task

     

    I use Aptana, but the console gaves me an error: alert is not defined.

    Here's the code

     

    <body>
    <h1>JavaScript 101 - 1er exercici</h1>
    <script type="text/javascript">
    var missatge= "Hola, sóc un programa" ;
    alert(missatge);
    </script>
    </body>

    What is wrong?

  • Anonym   May 24, 2011, 5:33 p.m.
    In Reply To:   Sedmikrasky   May 24, 2011, 4:51 p.m.

    Not seeing anything wrong here as it worked for me. I tested it on Mac OS10.6 with Google Chrome, Firefox 4, Safari 5 and Opera 11.

     

    What is your question or concern exactly?

  • Sedmikrasky   May 24, 2011, 5:35 p.m.
    In Reply To:   Anonym   May 24, 2011, 5:33 p.m.

    I test the code, and works fine, but I don't understand why Apatana marks me "alert is not defined." error :(

  • Anonym   May 24, 2011, 6:05 p.m.
    In Reply To:   Sedmikrasky   May 24, 2011, 5:35 p.m.

    I have just ran the code from your page using Aptana (build: 3.0.1.201104291443) and I did not get any error.

  • Sedmikrasky   May 24, 2011, 6:32 p.m.
    In Reply To:   Anonym   May 24, 2011, 6:05 p.m.

    I have the same version but I didn't installed the GIT. Now it gets a warning but with the same text (alert is not defined). I changed alert for another onclick and I get the same warning at the console :(

  • Anonym   May 24, 2011, 6:44 p.m.
    In Reply To:   Sedmikrasky   May 24, 2011, 6:32 p.m.

    Are you sure that the code you have in Aptana is exactly the same as the code you have in your page? Please check.

    If so, I would suggest to uninstall Aptana and reinstall (if it offers to install Git, accept). Make sure you are not blocking any of the installation with security software.

    If that doesn't work and you still want to keep Aptana then you can post a query at

    https://aptanastudio.tenderapp.com/discussion/new

    If you decide to get rid of Aptana, you could just use notepad++ together with jsBin/jsFiddle which will take you quite a long way without all the headaches of an IDE.smiley

  • This comment was deleted.
  • Anonym   May 24, 2011, 5:52 a.m.
    In Reply To:   Anonym   May 23, 2011, 5:05 p.m.

    Not sure that this qualifies as a "Practical First Exercise"laugh.

    Are there two separate cases here? One involving a form and another not?

    In the form case, is the form submission really stopped? I am not a jQuery expert but there must be plugins to cover this sort of thing.

    Maybe you could describe the situation you are trying to cover more explicitly?

     

  • boobaloo   July 5, 2011, 3:23 a.m.
    In Reply To:   Anonym   May 23, 2011, 5:05 p.m.

    Use

    confirm ('are you sure you wish to submit the form?');
    

  • Anonym   July 11, 2011, 10:19 p.m.
    In Reply To:   boobaloo   July 5, 2011, 3:23 a.m.

    thanks but didnt do the trick i was looking for. still gives me "leave this page" or "stay on this page" buttons