Hi Peter,
I have the following situation.
In a page I have an article with one module inside it and two modules in the sidebar.
The modules in the sidebar are for
1. throw dices by clicking on a button
2. switch between test and practice mode by clicking on a button
The article has a module with 36 clickable pictures in it.
The visitor should click on the picture that corresponds with the dices.
I want to use sourcerer for php and javascript code to perform the calculation and handling the results.
But how do I code the mouseclick to perform the javascript actions.
And is it better to put the javascript code in a file or directly in the article/module?
That is a very specific javascript question, that doesn't have much to do with Sourcerer itself.
Triggering javascript functions via an onclick on a button is standard html/javascript knowhow.
I recommend you use google to find answers on that. Or hire a webdeveloper that does know how javascript works.
Whether it is better to place javascript inline or in an external file is also more of a javascript-centic question and all depends on the amount of javascript and whether you need to re-use it in different pages.
Thanks for your reply Peter.
I have already tried to find the solution, but that what comes around, like w3schools.com, don't give the answers I need.
But thanks anyway 🙂