<?xml version="1.0"?> <!DOCTYPE ui:application PUBLIC "-//NPC//DTD WDIALOG 2.1//EN" ""> <ui:application start-dialog="add-numbers"> <ui:dialog name="add-numbers" start-page="enter-numbers"> <ui:variable name="first_number"/> <ui:variable name="second_number"/> <ui:variable name="result"/> <ui:page name="enter-numbers"> <html> <head> <title>The Ultimative Adder</title> </head> <body> <ui:form> <h1>The Ultimative Adder</h1> <p>Please enter the two numbers you want to add:</p> <p> <ui:text variable="first_number"/> + <ui:text variable="second_number"/> = <ui:button name="add" label="Compute Result" goto="display-result"/> </p> </ui:form> </body> </html> </ui:page> <ui:page name="display-result"> <html> <head> <title>The Ultimative Adder</title> </head> <body> <ui:form> <h1>The Ultimative Adder</h1> <p>The result is:</p> <p> <ui:dynamic variable="first_number"/> + <ui:dynamic variable="second_number"/> = <ui:dynamic variable="result"/> </p> <p> <ui:button name="back" label="Go back" goto="enter-numbers"/> </p> </ui:form> </body> </html> </ui:page> <ui:page name="display-error"> <html> <head> <title>The Ultimative Adder</title> </head> <body> <ui:form> <h1>The Ultimative Adder</h1> <p>Sorry, one of your numbers is not a number. Please go back and correct your input.</p> <p> <ui:button name="back" label="Go back" goto="enter-numbers"/> </p> </ui:form> </body> </html> </ui:page> </ui:dialog> </ui:application>