Javascript Focus Is Not Working on Aspx Page
<p>Hy Guys,</p>

<p>Please Look at the code and Try to Help Out. The function ive written is not working but its RUNNING properly. Its about To set focus on next content on page im using it on an ASPX page. Heres my code Below :</p>

<pre><code>function SetFocusOnSave(CTag,NTag)
{
    alert('Running'+CTag+NTag);

    var CurrentTag=document.getElementById(CTag);    
    var NextTag = document.getElementById(NTag);

    if ( (event.keyCode==13)||(event.keyCode==9) )    
    {    
        if(CurrentTag.value=="")    
        {    
            alert("Please Enter Detail First");    
            CurrentTag.focus();    
        }

        if(CurrentTag.value!="")
        {
            event.returnValue=true;    
            document.getElementById(NextTag).focus();
        }    
    }
}

snametxt.Attributes.Add("onkeypress",    
              SetFocusOnSave('&lt;%=snametxt.ClientID%&gt;','&lt;%=sdesctxt.ClientID%&gt;');");
</code></pre>
