0
On the system I am working on, there is a php file of js functions:
<script type="text/javascript">
function alertaProximaBloqueada(){
[...]
}
function ManualAluno() {
[...]
}
[...]
</script>
This file is included at the end of the view that uses these functions, thus:
</body>
<?php include 'Includes/funcoes_ameai.php';?>
What happens is that when I look at the source code with crtl+u the functions are all there, but when I try to execute any one, I get this error:
Uncaught Referenceerror: NOME_DA_FUNCAO is not defined [...]
The strange thing is that if I copy the function and play in the same place it is being included, inside the view (between the tags ), I can run it normally.
I’ve already tried it, I’ll try it once more
– Otavio Souza Rocha
It didn’t even work, it matters, if I access it in the source code, I can view the code and even then the error repeats
– Otavio Souza Rocha
When viewing the source code, is the script being called before the location where its function is called? What I mean is that if during execution you try to call a js function that will be declared after, it really won’t work.
– David Alves