I have 3 Files:
-
Php file where i include the other two files like this:
<head> <!-- 1. Javascript File--> <script src="js/functions.js"></script> </head> <html> <?php include 'includes/question1.html' ?> </html>
-
The functions.js file looks like this:
$(document).ready(function(){ function showError(){ alert('ERROR'); } }); $('input').change(function(){ // SOME STUFF HERE });
But Now i want to use the "showError" Function or the "change" Function in the third data or in the normal Php file but it says everytime that there is no function like this.
It's only a problem of visibility how can i change this ?