Calling Python from Javascript

Hi sc549,

I clone the app Forum Clone of TestScript and found where the Javascript function is called but cannot see where the javascript is actually placed. Could you please help?

from ._anvil_designer import Form2Template
from anvil import *

class Form2(Form2Template):
  def __init__(self, **properties):
    # Set Form properties and Data Bindings.
    self.init_components(**properties)
    # Any code you write here will run when the form opens.
    
  def my_method(self):
    return self.myproperty

  def form_show(self, **event_args):
    """This method is called when the HTML panel is shown on the screen"""
    self.call_js('test_function')