Ok so I have a PHP document wich saves the contents of a text input how do I trigger a function in a .js file when it's done . I've done the part with the uploading I just can't figure out how to trigger the js function
You can simply do this:
echo "<script src='myScript.js' type ='text/javascript'> myFunction(); </script>";
Im not exactly sure what functionality you're trying to get working but if this is supposed to be some kind of data controller where you simply process data, calling echo may give the user a blank screen, so you will want to redirect the user like so
header('Location: redirectLocation');
Do try to provide more details in future questions, but i hope this answered your question.
Kris, you can't call a js function from a PHP script. As per my understanding, you should call an AJAX function on click of the button that will call the PHP script and on the success you can call the javascript function that you want to call.