Rav Posted June 6, 2016 Posted June 6, 2016 Hello, I want to send the width of the form having AlignmentControl=uniAlignmentClient to the server but always receive various javascript errors. How to create a proper ajaxRequest? One of my bad tries: function window.destroy(sender, eOpts) { ajaxRequest(sender, 'WindowWidth', ['Width='+window.getWidth()] ); } Quote
ZigZig Posted June 6, 2016 Posted June 6, 2016 A solution (maybe among others...) : 1. Don't use 'window.destroy' function (your ajaxRequest will never be thrown to the server), prefer 'window.hide'. 2. Set the "FreeOnClose" property of your Form to False. By doing this, when you close your form, 'window.hide' is executed (otherwise, it won't). 3. replace 'window.getWidth()' by 'sender.getWidth()' in you ajaxRequest (which has to be written in 'window.hide' function) : ajaxRequest(sender, 'WindowWidth', ['Width='+sender.getWidth()] ); Hope it will help! Quote
Rav Posted June 7, 2016 Author Posted June 7, 2016 Thanks! That works perfect. I had no idea that such a simple request requires so deep knowledge of UniGui. 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.