Quote from
luishp on May 16, 2025, 8:20 am
In VisualNEO Web, when working with a FileInput object, the onchange event doesn't trigger again if the user selects the same file twice in a row. This is standard browser behavior for HTML file inputs.
To allow re-selecting the same file, you need to reset the file input field. Unfortunately, simply resetting a variable bound to it won't work because the file selection resides in the DOM element, not in the NeoScript variable.
Solution:
BeginJS
$("#f1").val = "";
EndJS
Where f1 is the property-name you have assigned to the FileInput object.
If you want to reset immediately after a file is selected (so it can be chosen again), append the above code to the end of the onchange handler
In VisualNEO Web, when working with a FileInput object, the onchange event doesn't trigger again if the user selects the same file twice in a row. This is standard browser behavior for HTML file inputs.
To allow re-selecting the same file, you need to reset the file input field. Unfortunately, simply resetting a variable bound to it won't work because the file selection resides in the DOM element, not in the NeoScript variable.
Solution:
BeginJS
$("#f1").val = "";
EndJS
Where f1 is the property-name you have assigned to the FileInput object.
If you want to reset immediately after a file is selected (so it can be chosen again), append the above code to the end of the onchange handler