[Javascript] Is there a way to capture the key stroke and...

Scott.Wiseman swiseman at remax-cahi.com
Mon Jul 15 19:28:04 CDT 2002


not have it output to the field...
just get rid of the keystroke

I guess trap it..


function checkit()
{


  var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;


if (keycode == 13)
   {
        
    add_data();
  
   return false;
   }
   
if  (keycode ==43)
   {
   
        window.document.myform.gcc.value=''; alert('zerod out ggc value');
        
        document.myform.AssociateName.selectedIndex =
document.myform.AssociateName.selectedIndex + 1  ;
         if(document.myform.AssociateName.selectedIndex<0)
     {
         alert("No more associates..Starting at the first one");
         document.myform.AssociateName.selectedIndex =1;
     }    
     
        
 
getCommissionsByRecordnumber(document.myform.AssociateName.selectedIndex,
window.document.myform.gcc); 

        return false;
   }
   
   
else
{

   return true;
}   
   
}



More information about the Javascript mailing list