Studies show that top navigations tend to get the most visual attention when a user first visits a site. Having organized and intuitive navigation is key — and while most drop down menus may look aesthetically pleasing, developing them to degrade gracefully is also essential. In this tutorial I would like to go over how to create a sexy drop down menu that can also degrade gracefully. Read more…
Although JavaScript provides a bunch of methods for getting and setting parts of a date object, it lacks a simple way to format dates and times according to a user-specified mask. There are a few scripts out there which provide this functionality, but I’ve never seen one that worked well for me… Most are needlessly bulky or slow, tie in unrelated functionality, use complicated mask syntaxes that more or less require you to read the documentation every time you want to use them, or don’t account for special cases like escaping mask characters within the generated string.
When choosing which special mask characters to use for my JavaScript date formatter, I looked at PHP’s date function and ColdFusion’s discrete dateFormat and timeFormat functions. PHP uses a crazy mix of letters (to me at least, since I’m not a PHP programmer) to represent various date entities, and while I’ll probably never memorize the full list, it does offer the advantages that you can apply both date and time formatting with one function, and that none of the special characters overlap (unlike ColdFusion where m and mm mean different things depending on whether you’re dealing with dates or times). On the other hand, ColdFusion uses very easy to remember special characters for masks. Read more…
Within the code in the previous section, I mainly created a simple text box and a button. The textbox is named “txtContent” and the button is named “ButtonShowMsg.” The button is defined with an “onclick” event which calls a JavaScript function “ButtonShowMsg_onclick,” which is defined as follows: Read more…
Recently i created JavaScript application which tests user connection speed, in fact it measures connection speed between user and my server, but that aside, i decided to share with you mechanics and technology i used to create this tool, maybe some of you guys will find this helpful. Also i want to promote interesting small AJAX framework
.
Before we start, you need to have basic idea of what AJAX is, if you need to you can read my Introduction to AJAX post. Also, this time instead of creating all functions by myself i used advAJAX, it is lite (only 15kB) and very easy to use AJAX framework, created by Polish web developer who goes by the name Anakin. You can download it here. Full english documentation can be found here. Read more…