-
Stanford Web Applications course lectures
You can now watch the fall 2010 Stanford Web Applications course containing 104 recorded lectures. The course contents are:
- INTRODUCTION
- HTML and CSS
- URLs and Links
- The Ruby Language
- Rails Introduction
- Introduction to SQL
- Active Record
- HTTP and HTTPS
- Cookies and Sessions
- Forms
- Javascript
- The Document Object Model (DOM)
- Events
- AJAX
- Security: Network Attacks
- Security: Session Attacks
- Security: Isolation
- Security: Code Injection
- Security: Phishing Attacks
- Large-Scale Applications
- Datacenters
- Deploying Web Applications
- Course Wrap-Up
-
Testing JavaScript with JsTestDriver
JsTestDriver is a tool to execute unit tests for your JavaScripts. This article explains how to write tests and use the tool to automate testing your code in several browsers.
-
To use localStorage in Firefox cookies must be allowed
In case a JavaScript generates a security error in Firefox when using localStorage, I found the advice to make sure the about:config property dom.storage.enabled to true.
But this is not enough! localStorage is only available if cookies are allowed for the domain that serves the web page with the script.
I find this strange, cookies are completely different things.
-
A trim() method for the JavaScript String class
Just rediscovered that IE still doesn’t include the trim() method on the String class. Here’s a snippet of code, based on an answer on StackOverflow, to make sure there’s a trim method available:
if (typeof String.prototype.trim !== 'function') { String.prototype.trim = function() { return this.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } }On the positive side I also found out about the debugger included in IE 8. Just like Firebug, available via F12!
-
Google Closure tools
Google announced the availability of Google Closure Tools, a set of JavaScript tools to help development of web applications. The set contains:
- Closure Compiler: a JavaScript optimizer
- Closure Library: a JavaScript library with reusable UI widgets and controls, utilities for the DOM, server communication, animation, data structures, unit testing, rich-text editing etc.
- Closure Templates: a client- and server-side templating system that helps you dynamically build reusable HTML and UI elements.
-
GMarker title deactivates mouseover event
Quick tip for Google Maps developers: the mouseover event of a GMarker doesn’t fire when the marker has a title. This isn’t mentioned in the mouseover documentation.
-
Creating upgradable bookmarklets
I haven’t seen this technique before, but the implementation of Reading Blinds bookmarklet, a tool to focus your eyes on reading a page, really eases maintenance of a published bookmarklet.
Instead of embedding the JavaScript code in the link, this bookmarklet uses the DOM to add a script link the <head> of the page. This gives the developer an easy way to release improved version, just update the file and all users will automatically use the new version.
-
Digg enhancer Greasemonkey script
Everytime I looked at Digg it bothered me that the boxes with the number of diggs in front of each news item overlaps with a the start of the text.
So I made a litte Greasemonkey script that move the text to the right. And at the same time it removes the upper limit of the page width, so there’s less space wasted on the sides of the pages.
Installation
- This script requires Greasemonkey, so if you don’t have that installed do that first.
- Install Digg enhancer.
-
Dynamic Drive
Dynamic Drive is a collection of cross-browser compatible DHTML & Javascripts in several categories like Dynamic Content, Form Effects, Games and Menus & Navigation. The scripts are free for personal and commercial use.
-
JavaScript Reference
This JavaScript Reference is a comprehensive listing of JavaScript objects, properties, and methods. The reference also includes explanations and examples.