I would like to execute some Javascript after the document has loaded and even after the document.onload functions have been executed.


I'm loading a text-edit field through ajax. When the user submits the form, he is redirected to a PHP file. That PHP file redirects him back to "file.php" using header('location: file.php');

What I want to do is to execute some Javascript actions in file.php, but when I print the <script></script> tags the file id displayed blank - nothing is loaded at all. As soon as I leave them out, the page does get loaded.

Any suggestions?

6 Years
Discussion Span
Last Post by minitauros

what exactly do you mean? running it when you press a button, running it after the page has loaded with a time-interval, ... ?

not sure what you mean, but I'm pretty sure there 'll be a javascript or jQuery library "out there" that can do exactly what you want it to do.


Solved. The problem was not that it's impossible to load <script> tags, it was just an error in the code.. Stupid me :).

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.