Ticker Tape ParadeLittle pieces that may just make sense

Hilarious Dina Malar Code

September 28, 2009

First the relevant Javascript:

function  validateloc()
{
if(document.FrontPage_Form1.Commentby_loc.value == '')
{
alert("Enter Your Location");
//document.FrontPage_Form1.Commentby_loc.focus();
return false;
}
return true;
}

Now where it is used on the page:

<textarea cols="49" rows="9" name="Message" class="textbox" onfocus="javascript: return validateloc();" >

From here. This results in an infinite loop of alerts until you defocus the comment text box.

Via ilugc