I can create a button and click on it. I want the normal Explorer window to appear and you can choose only XML files, select it and it is uploaded and then used in the program instead as the ones already given in the program.
Angular JS is used, so the button will be an ng_click module. The XML file should also be checked that it is a real XML file.
This actually works but would be nicer if the button said “Choose XML file” instead of just “Choose file”.
Once it is selected, something should happen with it, can this be done automatically or is it better to click on another button? I can use the ng-click for that. But that should only work if a file has been uploaded before. So there needs to be a check for that.
$scope.useXML = () => {
}
The uploaded file should then be put into a variable instead of the ones already pre used in the program.
I deleted my original post as you confirm that it doesn’t solve the problem. When I read about it in more detail, it turns out that changing the button text isn’t something you can easily do. Sorry for the confusion.
Yup. Because what you needed was to trigger the click on an element without seeing the element. You already know how to bind things to clicks, because you showed it to us in post 3.
Changing the button’s innerHTML would change the text of the button.