| You are here: | About>Computing & Technology>JavaScript |
![]() | JavaScript |
Radio Button ValidationOne of the easiest form fields to validate in JavaScript (but the one that gives many people the most trouble) are radio buttons. In this tutorial we look not only at how to validate radio buttons quickly and easily but also at how to attach the text associated with each button so that clicking on the text will select the appropriate button just like they do automatically everywhere except on the web. Radio Button Validation Sunday May 18, 2008 | permalink | comments (0) First FocusJavaScript can help your visitors start filling out a form without having to use their mouse first. What normally happens when you add a form to your web page is that your visitor must first select the first field in the form before they can start typing in their information. A simple addition to the body tag of your page can give the first input field the focus when the page first appears. First Focus Saturday May 17, 2008 | permalink | comments (2) Testing ColoursJavaScript irons out browser differences Testing what colour or background colour part of your page is set to is not as straightforward as it ought to be. When you use JavaScript to look up the colour setting in the stylesheet the format of the value that is returned depends on the browser you are using. For a cross browser solution you need to test for more than one alternative. Testing Colours Friday May 16, 2008 | permalink | comments (0) 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) 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. |


