0

I am trying to trigger my note.send function (from a method) whenever I call a javascript function.

Here is my Javascript code.

function send_mail(){
            {{ note.send }}
            }

I then call the function send_mail() whenever an specific action happens on the website, however the django template function is called each time I reload the website even if I don't call the javascript function at all. Please help

  • 2
    Does this answer your question? [What is the difference between client-side and server-side programming?](https://stackoverflow.com/questions/13840429/what-is-the-difference-between-client-side-and-server-side-programming) –  Jun 03 '21 at 11:17
  • If you javascript is inside a template you can do it. Or, you can use the template engine to build javascript.. but with a non-static url to it.. Or you can use something like handlebars.js and use ajax to get some json from django... – sur.la.route Jun 03 '21 at 20:24

0 Answers0