ALL


  Prototypes in JavaScript

Following on from his previous article, David Chisnall explores JavaScript as an example of prototype-based object orientation. In this article, he shows how it's possible to implement more complex object models on top of this simple abstraction.My previous article, Prototypes and Object Orientation, considered the differences between class-based and prototype-based object orientation. In this article, we'll look in a bit more detail at the workings of the JavaScript object model, since it's currently the most popular prototype-based object-oriented language.What's New?In Self, you create...

3,016 0       PROTOTYPE JAVASCRIPT OBJECT ORIENTED OBJ


  CSS3 Animation With jQuery Fallbacks

In today's post, we'll be taking a look at how you can use CSS3 transitions to power your application's animations with jQuery's .animate() method as a fallback where transitions aren't supported. The benefit of transitions is that unlike JavaScript based animations, they're hardware accelerated in certain browsers and mobile devices, resulting in a potentially smoother overall animation than you would normally experience. In a lot of cases your code will work seamlessly with the solutions presented today, so the effort involved in applying them is minimal. Before we get started, if ...

8,685 0       JAVASCRIPT JQUERY ANIMATION DEMO CSS3


  Manipulating JavaScript Arrays

Our first tutorial on JavaScript arrays covered the basics: creating arrays, accessing the contents of arrays, array lengths, and looping through arrays.In this tutorial, you explore arrays in more depth, and learn how to use various methods of the Array object to manipulate arrays.Extracting sections of an array with slice()You're not limited to accessing single array elements at a time. Thanks to the slice() method, you can grab a whole section of an array at once. slice() has the following syntax:arraySlice = array.slice ( begin [, end] )The two parameters, begin and end, work as follows:be...

9,951 0       JAVASCRIPT ARRAY MANIPULATE JOIN SPLICE


  JavaScript: Passing by Value or by Reference

In JavaScript, we have functions and wehave arguments that we pass into those functions. But how JavaScript handleswhat you’re passing in is not always clear. When you start getting intoobject-oriented development, you may find yourself perplexed over why you haveaccess to values sometimes but not other times.When passing in a primitive type variablelike a string or a number, the value is passed in by value. This means that anychanges to that variable while in the function are completely separate fromanything that happens outside the function. Let’s take a look at the followingex...

4,228 1       JAVASCRIPT FUNCTION PASS BY REFERENCE PA


  JavaScript showModalDialog method

In JavaScript, showModalDialog()  method creates a simple modaldialog box which is a simple html page but when a modal dialog opens, user can't switch to another page until it closes the modal dialog box.Syntax:  window.showModalDialog( url, arguments, feature options); Where url is the URL of page which is to be opened in modal window and argumentsare those arguments which we are passing to the modal window and featureoptionsare the attributes set for the modal window.Description of code:Suppose we have an image file and we want to view that particular image fileinto a separat...

10,370 0       JAVASCRIPT JS SHOWMODALDIALOG EXAMPLE


  What is an HTC File?

Question: What is an HTC File?Did you find an HTC file on your computer and wonder what program should open it? Maybe someone emailed you an HTC file but you're not sure how to use it. Perhaps you tried to open the HTC file but Windows told you that it could not open it.Before you can open an HTC file (assuming it's even a file format that's intended to be viewed or edited), you'll need to determine what kind of file the HTC file extension refers to.Answer: A file with the HTC file extension is a HTML Component file.Other types of files may also use the HTC file extension. If you know of any a...

8,182 0       JAVASCRIPT HTC HTML COMPONENT EXTENSION


  JavaScript is now a necessity

I've long looked at JavaScript as a second-class citizen in the programming world. Early on, it was the source of numerous security problems; it was a nice bit of glue to patch together HTML applications with a bit of styling, but nobody would use it for serious code; and so forth. Java, Ruby, Python, they were the languages for doing real work. But my attitude toward JavaScript has changed completely in the past few years. JavaScript has "grown up." I'm sure there are many JavaScript developers who would take issue with that judgement, and argue that JavaScript has been a capable, mature, and...

4,578 0       JAVASCRIPT HTML5 NECESSARY CLIENT LANGUA


  5 Reasons Your Javascript Stinks

Javascript gets a bad rap on the Internet, but there are few languages that are so dynamic, so widespread, and so deeply rooted in our lives as Javascript is. The low barrier of entry leads some people to call it a script kiddie language, others scoff at the concept of a dynamic language while riding their statically typed high horse. You and Javascript just got off on the wrong foot, and now you've made it angry. Here's five reasons why your Javascript code sucks.1. You're not using a namespace.Remember in college when the teacher said you can't use global variables in your homework? Using gl...

3,112 0       JAVASCRIPT GOOD HABIT PROTOTYPE OOP