Req: How to copy the content of TextArea to Clipboard by Pressing button + conditional showing - Forum

Forum Navigation
You need to log in to create posts and topics.

Req: How to copy the content of TextArea to Clipboard by Pressing button + conditional showing

I am a neophyte in VisualNeo.

  1. How can I copy the content of TextArea to Clipboard by Pressing button
  2. Is there any easy way how to conditionally show ListBox, ComboBox etc based on the input in previous ListBox, ComboBox?

Hi @daniel-housa and welcome to the forum :)

How can I copy the content of TextArea to Clipboard by Pressing button

This should work (I will add a new command on next release):

SetVar [inputname] "TextArea1"
BeginJS
 var copyText = document.getElementById($App.inputname);
 copyText.select();
 copyText.setSelectionRange(0, 99999);
 document.execCommand("copy");
EndJS

Is there any easy way how to conditionally show ListBox, ComboBox etc based on the input in previous ListBox, ComboBox?

I don't understand your question very well. Do you mean using HideObject and ShowObject?

Regards.

Thank you. Regarding the second half of question. If one fills e.g. age in form above 50 or selects from roll down menu an item, I would show certain data based on input. Something like https://www.softworksgroup.com/synoptec-blog/smart-branching-pathology-templates/

@daniel-housa please take a look at the attached sample app.
Use right-click to download.

 

Uploaded files:
  • You need to login to have access to uploads.

Sorry being a little bit dull. Please find attached DEMO app. Where exactly to paste JS code?

Also, are there any code examples to be able to study the synthax of the language code.

Uploaded files:
  • You need to login to have access to uploads.

@daniel-housa not sure what are you trying to do but please take a look at the modified attached sample.

Also, are there any code examples to be able to study the synthax of the language code.

Best about VisualNEO is you don't have to remember any syntax. Just double-click any command and a window wizard will help you to add each parameter and write the code for you.
Anyway you can find a lot of samples in "My Documents\visualneoweb\Sample Apps" folder in your PC.
Also take a look at our offical YouTube channel for some step by step tutorials.

Best regards.

Uploaded files:
  • You need to login to have access to uploads.

@daniel-housa this is another sample. It shows how to use ListBoxes with Arrays.
This sample is included with VisualNEO Web. It's located in the "My Documents\visualneoweb\Sample Apps" folder.

Regards.

Uploaded files:
  • You need to login to have access to uploads.