Welcome to the seventh part of an eight-part series that shows you how to construct a web page calendar that will display the current month, the current year, any specified month, or any specified year. In this part of the series, I explain how the user can display the calendar of any year. To avoid writing too much code, you will have to do some modification of the previous code.
Modifying a Web Page Calendar - Limitations of this Approach (Page 4 of 4 )
Internet Explorer is the most used browser. If we were dealing only with Internet Explorer, then at this point we would have come to the end of the series.
I said at the beginning that when you have information that is in the form of a grid, you could use the table for your layout. This generally works with all browsers if your design is straightforward.
Our design in this series is not straight forward (looking at today's technology), because in our yearly calendar, we had to arrange tables in rows and columns inside DIV elements in a main DIV element. If our calendar were static content on the web page and occupying space, then this approach would work with more browsers.
From the tests I made, with today's evolution of browsers it works very well only with Internet Explorer. However, do not lose hope; I will modify the design to work with other browsers. The main problem lies with the layout.
If you write your program with what I have shown you so far in this series, the single month calendar will appear reasonably in many browsers. However, in browsers other than Internet Explorer, the yearly calendar would not appear well.
Know that what I have said in this series is in accordance with the specifications for HTML, HTML DOM and JavaScript. I believe that Internet Explorer is more advanced in handling HTML tables than other browsers.
The approach I have used has an advantage, in the sense that you easily get the logic of what is going on. In the next and last part of the series, I give you a design that should work with most, if not all, modern browsers. The difference is mainly in the layout.
At the end of the series (in the next part) I will give you two sets of the complete code in zip file formats: one to work with Internet Explorer and the other to work with most browsers, including Internet Explorer.
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.