posted on
Thursday, September 20, 2007 11:09 AM |
Girls are far smarter than me. So I've been spending time on my Ajax presentation and to fit code on a slide, I had alter it and slim it down to reduce white space. It makes it a less readable but I'm able to fit everything at a decent font size on the screen.
Me, being the wonderfully developer I am, just altered and moved on. I actually committed two bad acts of development. Code late at night while being tired, and not testing.
This is what I had.
<snip>
if( xmlRequest == null )
alert( "could not create request" ); return;
</snip>
Can anyone spot the problem? I couldn't either for a solid 5 minutes since I knew this code worked yesterday afternoon. I clicked the link, and nothing happened. "Hulk Angry Powers" started to activate.
Due to indenting, this is how the actually ran
<snip>
if( xmlRequest == null )
alert( "could not create request" );
return;
</snip>
The code should have read
<snip>
if( xmlRequest == null )
{ alert( "could not create request" ); return; }
</snip>