This will never work:
Code:
window.onload=myfunction1();
You don't really need to pass the () with the function name, ex:
Code:
<a href="otherfile.html?load=myfunction1">
and test it like:
Code:
if(getQval('load') == 'myfunction1')
Finally, in execution, you cannot use it:
Code:
window.onload=myfunction1;
unless you do it like so:
Code:
window.onload=function(){myfunction1();};
That's just the way assigning events works, and has nothing to do with passing the value. In other words, this will work:
Code:
window.onload=myfunction1;
this will not:
Code:
window.onload=myfunction1();
Bookmarks