I have this code:
$j(\"#regfname\").keypress(function () { alert(\'Handler for .keypress() called.\'); });
and want to execute only once..
You want to use the one function:
$j('#regfname').one('keypress', function(){...});