/pyjs/tests/test014.py

http://pyjamas.googlecode.com/ · Python · 10 lines · 8 code · 2 blank · 0 comment · 0 complexity · b86967ead225235ea59092e1d26c4ddd MD5 · raw file

  1. from ui import Button, RootPanel
  2. import Windows
  3. def greet(sender):
  4. Windows.alert("Hello AJAX!")
  5. class Hello:
  6. def onModuleLoad(self):
  7. b = Button("Click me", greet)
  8. RootPanel().add(b)