Archive for November, 2005

The trouble with with

Monday, November 21st, 2005

I’ve long been told that the with keyword in JavaScript is bad news, and long believed it. Today, I had a reminder of why that was.
I’m looking at a HTML form, that I want to parse programmatically rather than doing a straight submit. The parsing code that i’m modifying looks roughly like this:

var status=null;
with (document.myForm){
[…]

Crow-Eating Time

Monday, November 21st, 2005

What Dave Did Next

Monday, November 14th, 2005

Mouse Trap

Monday, November 14th, 2005