FP1: How to Add a Visual Basic Script to a Page

Last reviewed: March 17, 1998
Article ID: Q151348
The information in this article applies to:
  • Microsoft FrontPage for Windows, versions 1.0, 1.0a, 1.1

SUMMARY

The "More Information" section of this article includes an example of how to use Visual Basic scripts with FrontPage Editor.

MORE INFORMATION

Visual Basic scripts are fast becoming a method of bringing Web pages to life interactively. This is because Visual Basic scripts are much easier to write than Java, CGI, or PERL scripts. Visual Basic scripts and Java scripts both rely on the browser to perform the interactive functions, unlike CGI/PERL scripts, which are platform dependent.

To create a sample page that includes a text box and three buttons, follow these steps:

  1. Create a new page in an existing Web with the FrontPage Editor.

  2. On the Insert menu, click Bot, and click WebBot HTML Markup.

  3. In the WebBot HTML Markup box, type the following:

          <SCRIPT LANGUAGE="VBS">
          <!-- This comment hides the script from old browsers
          SUB ShowText(strText)
          display.value = strText
          END SUB
          --></SCRIPT>
          <INPUT TYPE="text" NAME=display VALUE=''><BR>
          <INPUT TYPE="BUTTON" VALUE="One" ONCLICK="ShowText('One')">
          <INPUT TYPE="BUTTON" VALUE="Two" ONCLICK="ShowText('Two')">
          <INPUT TYPE="RESET" VALUE="Clear">
    

  4. Click OK to exit the WebBot HTML Markup dialog box.

    NOTE: The form must be placed in the WebBot HTML Markup dialog box because the buttons have extended functionality.

  5. Save the page to the Web and view it with a Web browser.


Additional query words: insert
Keywords : fpedit kbusage kbdta
Version : windows:1.0,1.1
Platform : WINDOWS
Hardware : x86
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 17, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.