FP1: How to Add JavaScript to a Page

Last reviewed: March 17, 1998
Article ID: Q151347
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 the steps you need to follow to use JavaScript with FrontPage Editor.

Note that FrontPage 98 and 97 include a tool specifically designed for inserting Internet scripting languages in FrontPage pages.

NOTE: You must use a Java-enabled Web browser to view a page that includes JavaScript.

MORE INFORMATION

Java-enabled pages have fast become a method of making Web pages interactive. Because JavaScript relies on the browser to perform interactive functions, it is more reliable than CGI or PERL which are platform dependent.

Use the following steps to create a page that contains a form with a three- button text box:

  1. In FrontPage Editor, create a new page in an existing Web.

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

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

    <SCRIPT LANGUAGE="LiveScript"> <!-- This comment hides the script from old browsers function ShowText(form, strText) {

         form.display.value = strText;
    
    } --> </SCRIPT>

    <FORM> <INPUT TYPE="text" NAME="display" VALUE=""><BR> <INPUT TYPE="BUTTON" VALUE="One" ONCLICK="ShowText(this.form, 'One')"> <INPUT TYPE="BUTTON" VALUE="Two" ONCLICK="ShowText(this.form, 'Two')"> <INPUT TYPE="RESET" VALUE="Clear"> </FORM>

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

    NOTE: You must place the form 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 Java-enabled Web browser.


Additional query words: 1.00 1.x applet java script front page
Keywords : kbusage kbdta
Version : windows:1.0,1.0a,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.