Javascript blur problem

Posted by hank, Wed Apr 04 19:49:00 UTC 2007

Today, I had a problem doing this:

<input type='text' readonly onFocus="alert('manatee');this.blur();" />

The problem was it would go into an infinite alert loop. That’s not cool. The fix was to reverse the calls:

<input type='text' readonly onFocus="this.blur();alert('manatee');" />

Tags:

Comments

Have your say

A name is required. You may use Markdown in your comments.