thecrgrt Posted July 17, 2011 Share 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 Link to comment Share on other sites More sharing options...
thecrgrt Posted July 17, 2011 Author Share Posted July 17, 2011 For Intraweb, the back button was automatically disabled Quote Link to comment Share on other sites More sharing options...
thecrgrt Posted July 18, 2011 Author Share 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 Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 18, 2011 Administrators Share 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 Link to comment Share on other sites More sharing options...
ldb68 Posted July 18, 2011 Share 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 Link to comment Share on other sites More sharing options...
AMIT Posted July 18, 2011 Share 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 Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 18, 2011 Administrators Share 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 Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 19, 2011 Administrators Share Posted July 19, 2011 I will log an issue for this so in future this will be handled in uniGUI. #1094 Quote Link to comment Share on other sites More sharing options...
thecrgrt Posted July 20, 2011 Author Share 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 Link to comment Share on other sites More sharing options...
thecrgrt Posted July 20, 2011 Author Share Posted July 20, 2011 And for ClientEvents, is it possible to have an events handle management for "document"? maybe added to ServerModule. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 20, 2011 Administrators Share 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 Link to comment Share on other sites More sharing options...
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.