Jump to content

disable Backspace Key


thecrgrt

Recommended Posts

I found the solution, I was created the following script file and added it into CustomFile property of ServerModule

if (typeof window.event != 'undefined') // IE
document.onkeydown = function() // IE
{
 var t=event.srcElement.type;
 var kc=event.keyCode;
 return ((kc != 8) || (t == 'text') ||
   (t == 'textarea') || (t == 'button') || (t == 'submit') ||
   (t == 'password') || (t == ''));
}
else
document.onkeypress = function(e) // FireFox/Others
{
 var t=e.target.type;
 var kc=e.keyCode;
 if ((kc != 8) || (t == 'text') ||
   (t == 'textarea') || (t == 'button') || (t == 'submit') ||
   (t == 'password') || (t == ''))
   return true;
 else {
   return false;
 }
}

 

For web-based application, this feature is important, IMO.

I hope this feature was added to UniGUI framework. (and also session management when F5 was pressed :))

Link to comment
Share on other sites

Added above code in MainForm.Script without // but application dosn't load inside browser.

If I remove the code it load correctly!

What I'm wrong?

 

 

Thanks for above code snippet.

 

You can also put the above code in MainForm.Scripts, but you must use

 

/*   	*/

 

instead of

 

//

 

Current uniGUI parser doesn't handle // properly.

Link to comment
Share on other sites

Thanks for above code snippet.

 

You can also put the above code in MainForm.Scripts, but you must use

 

/*   	*/

 

instead of

 

//

 

Current uniGUI parser doesn't handle // properly.

 

What is the different between putting in ServerModule CustomFiles and MainForm Script?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...