Let me start by saying this is kind of a duplicate to this question:
run function when page is loaded.
But the difference is, while the referenced question includes the javascript function in a html code, i want to know how to use a function from a .js
file in my .html
file without including the entire function which is quite bulky.
I have tested this function by adding it to an event that is triggered when i click a button (function retrieves data from a Google App Engine server)
$ (document).ready(function() {
$("#showMembers").bind('click', function(event) {
event.preventDefault();
doViewMembersRequest();
}); });
What i need is a way to call doViewMembersRequest();
from my viewmembers.html
file .