I have been encountering a similar problem to others, but despite trying the solutions provided in previous questions, I am unable to resolve it.
In my <template>
:
<modal name="MyModal" >
<span class="myClass" id="visible">visible</span>
</modal>
In my <script>
:
export default {
name: "myProject",
data: function() {
return {}
},
methods:
Open_EditTask: function() {
this.$modal.show("MyModal");
this.CurrentTask = this.MyTask;
if ( app.EditTask.visible == true ) { document.getElementById('visible').innerHTML = 'visible'; }
else { document.getElementById('visible').innerHTML = 'hidden'; }
}
}
I utilized the modal
plugin for modal creation.
The issue arises when the modal is opened as the text does not change based on the value of app.EditTask.variable
. However, when attempting to print the value, it correctly displays either true or false.
Error message:
Uncaught TypeError: Cannot set property 'innerHTML' of null