JavaScript
Terse Javascript Alternations, and the Frameworks' Problem with SQL
Submitted by johnk on Tue, 09/30/2008 - 12:58.Cool
Here's a snippet of javascript that breaks up a phone number into its parts, if it's formatted in the common formats.
var cell = namesArray[rownum]['Cell'];Sarah Palin Pork Barrel Calculator
Submitted by johnk on Thu, 09/04/2008 - 09:37.Vice Presidential candidate Sarah Palin has recently been criticized for her pork-barrel spending. This web-calculator helps you figure out how extreme she is. (Calculator is on the full story.)
How Much Money Can You Save on Gas by Riding the Bus?
Submitted by johnk on Sat, 08/30/2008 - 13:42.This is a javascript calculator that will estimate if taking a bus will cost less than what you pay in gasoline. Surprisingly, for short commutes, commuting by car is cheaper than getting a bus pass. (Calculator is on the full article.)
AJAX and Javascript Widgets to do Hierarchies
Submitted by johnk on Mon, 03/03/2008 - 00:51.dhtmlxTree
tree tag on ajaxrain
tcl outliner - not ajax unfortunately
(a great tcl tutorial to read the sources for the tcl outliner)
Future Web App Development
Submitted by johnk on Tue, 11/20/2007 - 11:50.Things to read and research:
Adobe Flex
qooxdoo
Silverlight
OpenMocha
Backbase
Google Web Toolkit
Authenteo
WebKit
More info - Ajaxian
Not a framework - Scriptaculous which uses Prototype. (That and JQuery are in another post.)
Email Obfuscation and Shielding Script
Submitted by johnk on Wed, 09/26/2007 - 15:17.Here's a perl script that takes email addresses as arguments, and returns javascript code that hides your email address from web spiders. The email address is also linked so it's clickable.
#! /usr/bin/perl
foreach my $email (@ARGV) {
$email =~ s/@/ @ /;
$email =~ s/\./ . /;
@parts = split( ' ', $email );
print "\n";
print "document.write('');";
foreach my $word (@parts) {
print "document.write('".$word."');\n";
}
print "document.write('');\n";
print "\n\n";
}Hiding Email Addresses from Spiders and Spammers
Submitted by johnk on Wed, 01/24/2007 - 01:52.Here's a bit of PHP code that emits javascript. The javascript emits an email link, but coded in Javascript, so that most spiders won't be able to get your email address for spamming.
<?php
function printEmailAddress( $email )
{
$parts = explode( '@', $email );
echo '<script type="text/javascript"> var d = document;';
echo 'd.write("<a href=\'mailto:");';
echo 'd.write("'.$parts[0].'");';
echo 'd.write("@");';
echo 'd.write("'.$parts[1].'");';
echo 'd.write("\'>");';
echo 'd.write("'.$parts[0].'");';
echo 'd.write("@");';
echo 'd.write("'.$parts[1].'");';
echo 'd.write("</a>");</script>';
}
printEmailAddress("fake@mail.com");
?>
Novice's Notebook
Submitted by johnk on Wed, 12/13/2006 - 02:16.This is a repository of "novice" articles, written with the intent of driving more traffic to the site, and getting more ad clicks. It's pretty crass, I know, but the information may be very useful. Some of the content is adapted from the diy notes, and other notebooks, which are a bit rougher than these.
Most of these articles are not authoritative, because they're based on what I'm learning, as I'm learning it.
Password Quality Evaluator
Submitted by johnk on Thu, 12/07/2006 - 03:05.This is an up-and-coming feature on some sites. It measures the quality of a password, and gives the user immediate feedback about how good it is.
The JavaScript below does that. It calculates the score by grouping the keyboard into uppercase, lowercase, punctuation, and numbers. You get points for length, for diversity in using keys from different groups, for switching groups often, and extra for using punctuation.
The HTML part was intended for creating an .htaccess password.
Here's a demo:
|
Password Quality: |

