DOCUMENT:Q300467 13-MAY-2002 [frontpg] TITLE :FP: How to Clear a Search Form Text Box By Using DHTML PRODUCT :Word Front Page PROD/VER:: OPER/SYS: KEYWORDS:kbdta ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft FrontPage 2000 - Microsoft FrontPage 2002 ------------------------------------------------------------------------------- SUMMARY ======= In Microsoft FrontPage, the built-in search page includes a form with Submit and Reset buttons. It does not contain a Clear button to clear the form fields. This article explains how to use Dynamic HTML (DHTML) code to add a Clear button to the search results page. NOTE: The examples presented in this article use custom DHTML that may not be available in all browsers. For more information about compatibility with other browsers, click Microsoft FrontPage Help on the Help menu, type "compatibility" (without the quotation marks) in the Office Assistant or the Answer Wizard, and then click Search to view the topic. MORE INFORMATION ================ Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site: http://www.microsoft.com/partner/referral/ For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site: http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS NOTE: You may receive an error message if you copy and paste the examples directly from this article to FrontPage. The angle brackets ("<" and ">") may appear as escaped HTML code ("<" and ">"). To work around this behavior, paste the script in a blank Notepad document, and then copy it from Notepad before you paste it into FrontPage. 1. In FrontPage, open a server-based web. 2. Create a new search page: In FrontPage 2000: a. On the File menu, point to New, and then click Page. b. Click the General tab. Click the Search Page icon and then click OK. In FrontPage 2002: a. On the File menu, point to New, then click Page or Web. b. On the New Page or Web task pane, click Page Templates. c. Click the Search Page icon and then click OK. 3. Switch to HTML view and add the following DHTML code in the section of the page: 4. Add the following additional DHTML code in the section of the page. Use the appropriate code for your search configuration: If you are using Index Server or Indexing Services and IIS: If you are using the built-in FrontPage WAIS searching: 5. Switch back to Normal view and save the page to your web site. In Microsoft Internet Explorer, when you submit a search and click the Clear button on the search results page, the form fields will be cleared. REFERENCES ========== For additional information about working with the FrontPage Search Page, click the article numbers below to view the articles in the Microsoft Knowledge Base: Q300466 FP: Clicking Reset on Search Results Page Does Not Clear Form For additional information about HTML syntax, see the following World Wide Web Consortium (W3C) web site: http://www.w3.org/MarkUp/ Additional query words: front page ====================================================================== Keywords : kbdta Technology : kbFrontPageSearch kbFrontPage2002 kbFrontPage2000Search kbFrontPage2002Search kbZNotKeyword5 Version : : Issue type : kbinfo ============================================================================= 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. Copyright Microsoft Corporation 2002.