JavaScript Dates
Tuesday, July 22nd, 2008Yesterday we looked at all the methods that JavaScript provides for working with arrays. Today we take a similar look at dates and the ways that JavaScript can work with dates and times.
Yesterday we looked at all the methods that JavaScript provides for working with arrays. Today we take a similar look at dates and the ways that JavaScript can work with dates and times.
How do you define arrays in JavaScript? Well there are several different ways to do so.
How can you manipulate the content of your JavaScript arrays? Again there are a whole series of different methods available to make it easy to work with arrays in JavaScript.
This tutorial/reference shows you all the alternatives and how to use them in your code.
Sometimes you have a piece of content that you want to display in a number of different web pages and you want it to look the same in all the pages regardless of how the rest of the page looks. In this article we look at how you can write the stylesheet commands for a given piece of content in such a way as to minimise the possibility that it will interfere with the rest of the page.
The one browser that has always insisted on doing things its own way rather than following the standards is Internet Explorer (this is perhaps because for a number of years IE6 was so popular that it effectively was the standard). Now that IE only has 50% of the market you need your web pages to work on standards compliant browsers as well as IE and so you need to also be aware of the quirks in how IE works. One of these quirks is hasLayout and in this article we look at how to code your stylesheet so that it works correctly in both standards compliant browsers and in IE.
Adding an antispam plugin into your email client sounds like a nice idea for cutting down on spam. This one is available for Outlook Express, Outlook and Thunderbird. I tested it out with Thunderbird.
When you are defining the fields for your database tables you will have a lot of fields that contain text. In this article we look at the difference between defining those fields as char or varchar and the situations where one may be better than the other. Of course you may be using a database where the optimiser will automatically switch the type if you specify the less efficient one for you in which case you may not need this information to be able to make the choice but it will still be useful in letting you know how each actually works.
Most programming languages have a really obvious way of assigning default values to function arguments for when that parameter is omitted. JavaScript has a not so obvious but far more flexible way of doing it.
When coding your web pages there are two ways to specify the address of other files that you want the page to reference. You can use absolute addresses that include the domain name or relative addresses that don’t. Obviously external references need to use absolute addresses but internal ones are better done using relative references. You just need to work out where each reference is relative to.