3 Replies Latest reply on Feb 5, 2013 11:37 AM by Nancy OShea

    Practical uses of Java script

    johngordon12 Level 1

      I've been doing web design for a good few years, but have never dabbled in JavaScript. Partly because my background is design, so coding can seem a bit daunting, and partly because its never seemed something I need for the sites I do. They tend to be basic brochure sites, or database stuff with a bit if PHP and mySQL.


      Although I've used JS in sites, it's usually been off the shelf stuff

      for a particular thing.


      At the moment I'm freelance, but sometimes look for jobs, and JS always seems to be a basic requirement. So I always feel a bit stuck, as even with a few years experience and a reasonable looking portfolio, I don't even seem to possess the basic requirements for a web design job.


      I guess the answer is to try to learn a bit, but I wondered if anyone could give any pointers as to some typical practical applications that might help the penny to drop with the sorts if things I could be doing with JS. Because I think that's half the trouble - not really knowing what I'd do with it if I did learn a bit.


      Sorry if that's all a bit vague, but I know that this is a great forum for advice.


      Thank you!

        • 1. Re: Practical uses of Java script
          Jon Fritz II Adobe Community Professional & MVP

          The absolute must knows of web design in my opinion are HTML, CSS and Javascript then server scripting languages (like PHP) and databases (like mySQL).


          That being said, definitely take the time to learn Javascript, even if it's just to understand how to handle the pre-made jQuery (jQuery = simplified javascript function library) scripts available for free online.


          Photo galleries, slide shows, accordion menu systems are just the tip of the iceberg. These are all things that make your sites more visually interesting. Generally speaking you don't want to use javascript for base functionality (like navigation) due to the possibility the viewer has theirs turned off, or in the case of screen readers, never had it to begin with. However, the use of jQuery zooms, galleries, fades, etc, etc can make your site stand out significantly when compared to competitors.


          Even with a basic understanding of javascript you can make your sites much more attractive, useful and interesting to viewers.


          Here's a great place to start for jQuery: http://www.w3schools.com/jquery/default.asp

          • 2. Re: Practical uses of Java script
            Rob Hecker2 Most Valuable Participant

            Since you are asking for practical applications, here's one:


            On a form where you want totals/prices to change on-the-fly in response to user input, Javascript is the tool to use. For instance, I create forms for retreat centers, so when the registrant changes the length of their stay, the type of room they want, and any discounts they qualify for, the price is re-calculated accordingly.


            Essentially, whenever you want the page to change in some way without having to refresh the whole thng and that simple HTML can't handle, javascript (also think AJAX), is the tool.


            Jquery is nice for being able to simplify many javascript tasks, but it's good to learn some basic javascript and not just rely on jquery. If you learn it, you will discover ways to put it to work.

            • 3. Re: Practical uses of Java script
              Nancy OShea Adobe Community Professional & MVP

              The web is much more interactive now. That's in large part due to JavaScript and the convenience of JS libraries like jQuery, Prototype, Mootools, Yahoo UI and others which allow you to do more with less manual coding. 


              JS alone or with CSS (AJAX) aids in the creation of lots of things including but not limited to interactive menus, forms, panels, games, tooltips, apps & layouts for mobile devices, cookies, animation & transition fx...   You'll find more examples on JS Fiddle - a free JavaScript testing area.




              Nancy O.