Piot Daszewski Posted July 29, 2019 Share Posted July 29, 2019 I'm trying to do the following thing: I just want to get the file name to enter it into uniEdit. So I try to rebuild TUniFileUpload so that it does not execute the file itself, but only passes the name. However, I can not get from FExtEdit: TJSControl, which is simply a value field. How to do this to transfer the value from TJSControl to some String variable? Thank in advance for any hints Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 29, 2019 Share Posted July 29, 2019 Can you please specify which edition and build of UniGUI are you using? Quote Link to comment Share on other sites More sharing options...
Piot Daszewski Posted July 29, 2019 Author Share Posted July 29, 2019 I work with professional edition and Version:1.10.0 build 1471 Perhaps I have described the problem inaccurately. I just need to get the file name from the client instead of sending the whole file. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted July 29, 2019 Share Posted July 29, 2019 Hello, Please adjust your forum email address: http://forums.unigui.com/index.php?/topic/6291-new-users-please-adjust-your-forum-email-address/ Quote Link to comment Share on other sites More sharing options...
Piot Daszewski Posted July 29, 2019 Author Share Posted July 29, 2019 It's already done. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 29, 2019 Share Posted July 29, 2019 Thanks for the update. Please explain consistently once again what you wanted. BTW, can you upgrade to the latest build? Quote Link to comment Share on other sites More sharing options...
Piot Daszewski Posted July 29, 2019 Author Share Posted July 29, 2019 Yes, I plan to upgrade to the new version within the next month. In uniGUI, I use the TUniFileUpload component. It is very good and works great. Unfortunately, for one project I need to transfer to TUniEdit only name of file without sending it to the server. So I'm trying to make a class analogous to TUniFileUpdate, which will only return FileName. Actually, I have a solution, but I do not know how to get from FExtEdit: TJSControl, value from text field. Can you help me, suggest what script to do it, or maybe there is another solution. Thank you very much for your help and attention. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 29, 2019 Share Posted July 29, 2019 Ok I will check... Quote Link to comment Share on other sites More sharing options...
Piot Daszewski Posted July 29, 2019 Author Share Posted July 29, 2019 thanx a lot Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 29, 2019 Share Posted July 29, 2019 If I understand correctly, after selecting the file do you want to close the upload form and get the file name? Quote Link to comment Share on other sites More sharing options...
Piot Daszewski Posted July 29, 2019 Author Share Posted July 29, 2019 exactly Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 29, 2019 Share Posted July 29, 2019 Maybe something like this...: //alert(filename) - your custom code JSAddListener('change', 'function(me, filename){alert(filename); '+ FUploadForm.WebForm.JSName +'.close();}', FJSFileUpload); Quote Link to comment Share on other sites More sharing options...
Piot Daszewski Posted July 30, 2019 Author Share Posted July 30, 2019 OK, this code show me file name, and it is what i need, but I still don't know how to set this value to some string var. In TUniFileUpload is FileName property and now i need to set this property with value from alert(filename) . Can You help me how to do that? Quote Link to comment Share on other sites More sharing options...
Piot Daszewski Posted July 30, 2019 Author Share Posted July 30, 2019 In the end I came up with how I should do it. With Your code and UniGUI manuals I just change alert to UniEdit component in Main Form. Thank You for help! JSAddListener('change', 'function(me, filename){MainForm.UniEdit1.setValue(filename);}', FExtEdit); 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 30, 2019 Share Posted July 30, 2019 OK, very good. 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.