thecrgrt Posted July 17, 2011 Posted July 17, 2011 For UniGUI, how do i can disable Backspace key when there is no focus? Because of when Backspace key was pressed the browser is act as back button is pressed. Quote
thecrgrt Posted July 17, 2011 Author Posted July 17, 2011 For Intraweb, the back button was automatically disabled Quote
thecrgrt Posted July 18, 2011 Author Posted July 18, 2011 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 ) Quote
Administrators Farshad Mohajeri Posted July 18, 2011 Administrators Posted July 18, 2011 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. Quote
ldb68 Posted July 18, 2011 Posted July 18, 2011 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. Quote
AMIT Posted July 18, 2011 Posted July 18, 2011 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? Quote
Administrators Farshad Mohajeri Posted July 18, 2011 Administrators Posted July 18, 2011 What is the different between putting in ServerModule CustomFiles and MainForm Script? In serverModule you should put a JS file. In MainForm you can put the script itself. Quote
Administrators Farshad Mohajeri Posted July 19, 2011 Administrators Posted July 19, 2011 I will log an issue for this so in future this will be handled in uniGUI. #1094 Quote
thecrgrt Posted July 20, 2011 Author Posted July 20, 2011 I will log an issue for this so in future this will be handled in uniGUI. #1094 Thank you, that's good news. Quote
thecrgrt Posted July 20, 2011 Author Posted July 20, 2011 And for ClientEvents, is it possible to have an events handle management for "document"? maybe added to ServerModule. Quote
Administrators Farshad Mohajeri Posted July 20, 2011 Administrators Posted July 20, 2011 "document" is a global browser property and can be accessed from all events. We may arrange an event editor for it. Logged #1096 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.