Web Development

JavaScript Tutorials

Context menu pops up when you right click over any object. Every web browsers display default context menu when you right click on any object inside it. And context menus are different based on the type of object. For example you will not get same menu when you click on a text area and other [...]

The algorithm for checking leap year is like the one below 1. if the year modulo 400 is 0 , its a leap year 2. else if the year modulo 100 is 0, then its not a leap year 3. else if the year modulo 4 is 0, its a leap year 4. else its [...]

It doesn’t advertise itself as such, but the jQuery JS framework is quite possibly one of the best JS frameworks for PHP developers. Most of the frameworks out there are designed for developers with JavaScript experience, and understandibly so. But when I first started using jQuery, my JavaScript experience was something along the lines of [...]

Opening documents such as PDFs in a new window should be automated using JavaScript for the following reasons. Users will often close the web browser when a PDF is opened, mistakenly believing the document has been opened in Adobe Reader, the attribute historically used to open a new window, target, has been removed from the HTML 4.01 Strict specification (it’s now deprecated), opening a new window is a behaviour and should be moved to the behavioural layer.

JavaScript can be incredibly useful when you need to automate repetitive tasks. In this article we’ll implement a simple JavaScript function that will apply alternate striped rows to a table. We’ll implement this technique using unobtrusive JavaScript.

Here’s the problem. Say you’re comparing two floating point numbers a (71.00) and b (71.00) to see if they are the same. The problem is if you’ve done any calculations to arrive at these numbers they might actually be stored as 71.00000000001. Now if one of them is stored that way and the other isn’t and you compare the two to see if they are equal you’ll get a FALSE as the response, even though they should be the same.

Javascript is an interpreted language with a C like syntax. While many people brush the language off as nothing more than a browser scripting language, it actually supports many advanced concepts such as object-oriented-programing, recursion, lambda, and closures. It’s a very approachable language for the beginner that quickly scales to be as powerful a tool as your skills allow.

Jeffery Zeldman wrote earlier this year in his essay about Web 3.0 that “Wireframing AJAX is a bitch.” And while I can’t deny the statement, I do think there are steps we can take to alleviate the pain. The problem is static XHTML/CSS wireframes are woefully inefficient at the task of communicating and documenting the features available to the new crop of Ajax web sites. Because we’ve been working on a rather intense Ajax project for the last few months, we’ve been developing and refining a number of techniques and guidelines to help our team design for Ajax by moving beyond the traditional forms of functional specs and wireframes to something a bit more appropriate for the dynamic medium—rapid prototyping.

A couple of sections on arbitrary constant used to utilise JavaScript in order to generate some random content for that pesky right column. This was done for two reasons: 1) to give the site a bit more depth and 2) to help me learn the basics of JavaScript. Now that both of these goals have been achieved, here is a guide detailing how it is done, which will hopefully prove useful to anyone new to this sort of thing.

Javascript, despite the name, is not part of the Java programming language developed by Sun. It was originally introduced with Netscape Navigator v2.0 and was designed to create dynamic online pages, such as checking details on html forms before allowing the page to submit the data.