Adding additional Javascript file via page.AddExtraJavaScriptFile("/js/kff.js")
I know this code works as we are using in a different site.
kff.js Contents below
I know this code works as we are using in a different site.
kff.js Contents below
B4X:
/*********************************************************************************************
Allow Up, down enter keys to navigate grid
**********************************************************************************************/
$('input').keydown( function(e) {
var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
//13=enter 40=down arrow 38=up arrow
if(key == 13 || key == 40 || key ==38) {
e.preventDefault();
var inputs = $(this).closest('form').find('input[type=text]');
if (key==38)
{inputs.eq( inputs.index(this)-1 ).focus();
inputs.eq( inputs.index(this)-1 ).select();}
else
{inputs.eq( inputs.index(this)+ 1 ).focus();
inputs.eq( inputs.index(this)+ 1 ).select();
if (key==13)
{return false;}
}
}
}); //end of input keydown