John Hesch

Echoing my thoughts and interests

Archive for July, 2007

07-17-07

XAJAX addReplace is Broke

Posted by John

I'm building an online cash register and decided to use XAJAX as my PHP/Ajax toolkit. It was very easy to learn and begin using. In fact, I am amazed at how easy XAJAX is to use. The problem, it is still in the infancy stage and today I found that not all responses work as expected.

I needed to replace an element like this

JavaScript:
  1. $objResponse->addReplace("title", "innerHTML", "<h2>Enter Order Information</h2>", "<h2>Transaction Summary</h2>");

The expected result would be the HTML tag and text,

HTML:
  1. <h2>Enter Order Information</h2>

would be replaced with

HTML:
  1. <h2>Transaction Summary</h2>

I just couldn't get it to work. It appears that the problem is with Firefox. I didn't try IE but from what others have said, addReplace works in IE.

I finally had to come up with a workaround because I needed this to work in both IE and FF.

JavaScript:
  1. $objResponse->addClear("title", "innerHTML");
  2. $objResponse->addAssign("title","innerHTML", "<h2>Transaction Summary</h2>");

Simple, eh?

07-17-07

The New PDF Spam Technique

Posted by John

I have noticed an unusual amount of emails being received with no body text, just a .pdf file attached. I don't open any attachment unless I am expecting it, so the email goes immediately to the trash. After doing some research, I found that apparently attaching a .pdf file is the spammers new method of choice.

Seems like a pretty benign method of spreading spam.

07-12-07

Tracking Down a Hacker

Posted by John

This is a fascinating look at how one person tracked down a hacker who broke into a buddy's Linux server.

07-12-07

Useful Thunderbird Add-ons

Posted by John

I found a pretty cool list of Thunderbird Add-ons with some real gems like the add notes to email extension and the folder shortcuts.

I'm constantly reminded how much I love Mozilla applications!

07-6-07

CSS Redundancy Checker

Posted by John

CSS Redundancy Checker

A simple script that, given a CSS stylesheet and either a .txt file listing URLs of HTML files, or a directory of HTML files, will iterate over them all and list the CSS statements in the stylesheet which are never called in the HTML.

Basically, it helps you keep your CSS files relevant and compact. And it's reasonably accurate.

Unfortunately for me it requires Rubygems and Hpricot, plus a reasonably up-to-date version of Ruby.

Graytone | Design: Tenant Report