Creating the NumberGuess Server Response File

The user interface of your number-guessing game will consist of a simple text entry box, a Submit button, a Restart button, and plain text. The same SRF will be used throughout the user's session. This means that the same SRF will be used to play the game, display error messages, restart the game, and finally show the congratulations message when the user guesses the number correctly. To begin with, overwrite the current contents of your NumberGuess.srf file with the code from Listing 14.2.

Listing 14.2. Creating the NumberGuess.srf File
 1: {{ // This file implements the classic guess the number game }} 2: <html> 3: <script language="javascript"> 4: <!-- 5: function OnRestart() 6: { 7: location.href ...

Get Sams Teach Yourself Visual C++® .NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.