Server-Side Design

Server-side functions communicate with the client wizard through the windows.external object. Server-side script provides these functions to respond to wizard events and to retrieve information about the wizard.

The following topics are covered in this document.

Implementing Navigation Script Functions

Server-side script in each HTML page responds to navigation buttons through functions for OnBack, OnNext, and OnCancel. These functions must be accessible through IHTMLDocument::get_Script on the client and take no parameters.

OnBack()

  • Responds when the user clicks Back in the wizard.
  • If the current server-side page is the first server-side page, call window.external.FinalBack to instruct the client to navigate to the previous client-side page.
  • If the current server-side page is not the first server-side page, navigate to the previous server-side page.
  • This function must be implemented for each page. Any page that fails to do so is considered invalid and displays an error page.

OnNext()

  • Responds when the user clicks Next in the wizard.
  • If the current server-side page is the last server-side page, call window.external.FinalNext to instruct the client to navigate to the next client-side page or to complete the wizard.
  • If the current server-side page is not the last server-side page, navigate to the next server-side page.

OnCancel()

  • Responds when the user clicks Cancel in the wizard.
  • The UI should be designed so the user can cancel at any time.
  • Once any processing in the OnCancel function is processed, the client closes the wizard.

Other Methods and Properties

Client-implemented functions are accessed through windows.external, as are properties. Available services are as follows:

Methods

Properties

The following code sample shows server-side code for a simple wizard page which implements the web service's error page.

<html>
    <head>
        <script language="JavaScript">
            function window.onload()
            {
                window.external.SetWizardButtons(1, 0, 0);    
                <!-- Back button enabled -->
            }

            function window.onback()
            {
                window.external.FinalBack();
            }
        </script>
    </head>
.
.
.
</html>
                    

Client-Side Design

Registering a Service