| You are here: | About>Computing & Technology>JavaScript |
![]() | JavaScript |
Mathematical ArraysJavaScript allows you to add your own classes and objects If you have several arrays that contain numbers and you want to make working with those arrays easier then take a look at my mathArray class which provides built in ways to manipulate your entire arrays in single commands. Mathematical Arrays Thursday May 15, 2008 | permalink | comments (0) Multiple RequestsYou can submit a second Ajax request before the first returns provided you code it the right way. In all of the preceding Ajax tutorials we have looked at how to use Ajax to make a single request to the server. Because we are making asynchronous requests there is nothing to stop us from sending multiple requests back to the server to retrieve different things all at the same time. In this thirteenth Ajax tutorial we look at how we can set up multiple requests that can work independently of one another. Multiple Requests Wednesday May 14, 2008 | permalink | comments (0) JavaScript Execution OrderWhich piece of JavaScript runs when? To someone experienced with using JavaScript it is really obvious which parts of the code will be run at what stage in the processing of the page source in loading the page and subsequently as a result of interactions by the visitor. To someone who is just starting out it may not be anywhere near as obvious (particularly given that well written JavaScript is kept completely separate from the HTML). In this article we look at the different types of code fragments that can be found within any JavaScript and look at which parts of it get run when. JavaScript Execution Order Tuesday May 13, 2008 | permalink | comments (0) Creating ObjectsJavaScript is a prototyping language. You are not limited to just those objects that JavaScript has already defined or even to extending those objects (which would allow you to create objects that can do just about anything at all). JavaScript also allows you to define objects of your very own to use in your scripts as this twenty first tutorial on Modern Unobtrusive JavaScript demonstrates. Creating Objects Monday May 12, 2008 | permalink | comments (0) Introduction to Form Field ValidationOne of the first types of JavaScript you are likely to need to write for yourself is to validate a form. Before we start looking at how to validate form fields in JavaScript, let's start by looking at what types of form fields that there are and work out which ones will need to be validated. We also need to think about when to validate the fields. This first form field validation tutorial discusses the basics of HTML forms and how and when we would need to validate them with JavaScript. In subsequent tutorials we will look at how to actually apply validation to fields using JavaScript and where to attach out JavaScript to validate the fields at the right times. Introduction to Form Field Validation Sunday May 11, 2008 | permalink | comments (0) Watermarking ImagesDon't rely on JavaScript to protect your images! The only effective way to protect images on your web site is to watermark them. Find out why this method works while the alternative JavaScript and HTML based methods don't. Watermarking Images Saturday May 10, 2008 | permalink | comments (0) Alternatives to "eval"Some JavaScript commands are so inefficient and so rarely needed that you have to wonder why they are included in JavaScript in the first place. "eval" is one of the most misused JavaScript commands as well as being one of the least efficient to actually run. Almost every occasion where novice JavaScript programmers use eval it is actually unnecessary as JavaScript itself provides simple efficient ways of avoiding the need to use it in most instances. Alternatives to "eval" Friday May 9, 2008 | permalink | comments (0) What JavaScript Cannot DoUse the right tools for the job. While it is possible to put screws in with a spanner a screwdriver works far more effectively. Of course that screwdriver wont help much if all you have to use it with are nails. While there are a great many things that JavaScript can be used for to enhance your web pages and improve your visitors experience with your site, there are also a few things that JavaScript can't do. What JavaScript Cannot Do Thursday May 8, 2008 | permalink | comments (0) Aborting AjaxSometimes when waiting for an Ajax response the situation changes so that you no longer need it. Since Ajax is normally run asynchronously where we don't wait for the response to come back, circumstances may change so that the response is no longer required and we want to abort the request in order to make another more relevant one. In this twelfth Ajax tutorial we look at how to abort an outstanding Ajax request so that the browser can initiate a replacement request using the same code without getting confused between the original and replacement responses. Aborting Ajax Wednesday May 7, 2008 | permalink | comments (1) HTML Comments and JavaScriptWhat happens when you include HTML comments inside your JavaScript? When JavaScript was first introduced, only Netscape 2 supported it and so it was necessary to hide the JavaScript from browsers such as Netscape 1 and IE2 which didn't understand the script tag and would therefore display the script instead of running it. Many people still include the HTML comment code to hide the script from the huge number of visitors that they get who still use Netscape 1 and IE2. For those of us who don't have any visitors who still use such antiquated browsers we can remove those comments. Let's take a look at how we should be coding our embedded JavaScript now (as opposed to how it needed to be don way back in the 20th Century). HTML Comments and JavaScript Tuesday May 6, 2008 | permalink | comments (0) Display Latest Headlines | powered by WordPress |
|
All Topics | Email Article | | | ![]() |
| Advertising Info | News & Events | Work at About | SiteMap | Reprints | Help | Our Story | Be a Guide |
| User Agreement | Ethics Policy | Patent Info. | Privacy Policy | ©2008 About, Inc., A part of The New York Times Company. All rights reserved. |


