Xataface Application Framework
First let's modify our template to prepare for interactivity. We need to do two things:
spantag to the heading so that we can reference and change the "Hello World" text more easily.
The resulting template now looks like:
Notice that we referenced the
button tags with
js inside our module's directory. I.e.
Further, we're going to follow the best practice of creating a sort of namespace for our scripts (just like we did with our templates from the previous section) so that we don't conflict with the script locations in other modules or Xataface itself. Hence underneath our
js directory we're going to create a directory:
Inside the hello_world.js file add the following:
requirestatement) is wrapped in a
click()event on the
buttonand then change the "world" text to whatever text is entered into the text field.
The only change that we made was to register our
At this point we're ready to try out our action. Just point the browser to your hello_world action again (e.g.