Hi all,
I am a rookie for both ForUI and Javascript. As title, I separated this feature for 2 parts:
- Create a “brows…” button which implement file input feature:
About this, my method is to embed javascript source code inside my own button behavior. It seems work… but I’d like to figure out whether it’s exist a method which unnecessary to embed javascript source code.
- Create a “Submit” button which can submit my input file and activate progress bar.
About this part, I know how to complete it if not use ForUI.(through HTML!) But I don’t know how to complet it through ForUI. I have been test if pull a “iFram” to link my own page can success. But if I’d like to use any button style which recident in ForUI then I have no strategy.
Are there any can give me some hint or suggestion? Thanks a lot!
1 answer
If you just want to mockup the UI of file uploading, this could be done by using the TextEditBox and Button elements in ForeUI. But if you want to make a really working file uploading feature, this will need to embed the html code (using Html element) and maybe some Javascript (using Script element), since there is no file chooser element in ForeUI yet.
ForeUI’s progress bar element could be used for your second request. You can hide the progress bar by default and show it when the submit button is clicked. If you want the progress bar to reflect the actual progress, you will need to query the status in the backend by using the “Get JSON Object” or “Get Remote Content” action, and update the progress bar with its “Set Progress Value” action.