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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...