I have search a lot and found several methods about how to call page specific javascript with external files.
The best method i found is call one-line function in HTML page like
frontEnd.ContactPageLoad();
But this requires to have in-page javascript..
Other method is to have an id /attribute at body or at <script> tag and this to call what you want.
What should i do for this case?
EDIT
This is what i want..
http://paulirish.com/2009/markup-based-unobtrusive-comprehensive-dom-ready-execution/
According to the way you formulated your question :
Javascript is a scripting langage , it means it will evaluate line by line everything written in a script.
so if you put myFunction() at the beginning or the end of a file it doesnt matter , provided myFunction is defined. nothing requires to have javascript inside your html except a few framework perhaps.
write a a script called myscript.js then put a script tag in your html page :
have you tried this ?