I am totally new to JS (as such I use C and python) and I have been given a JS file for which I would like to create an onclick event for.
So, I took this on as a learning exercise, and I was confronted with something like this:
new ModeDetect,
QuasiNewton.prototype = {
width: 1024,
height: 768,
top: 0,
left: 0,
showQuasiNewton: function(a) {
//more stuff here..
},
The aim is to use something like this in html, to call showQuasiNewton
:
<a href="#" onclick="showQuasiNewton()">Display simulation results</a>
The above obviously does not work - since the JS seems to have a constructor and a prototype
and I was wondering how I could call the function showQuasiNewton
Any help would be greatly appreciated - I have no clue on JS.. :(