Microsoft KB Archive/197959

= How to use VBScript or JavaScript to create a drop-down control that opens a specific URL in FrontPage 2000 =

Article ID: 197959

Article Last Modified on 5/28/2007

-

APPLIES TO


 * Microsoft FrontPage 2000 Standard Edition

-



This article was previously published under Q197959



For a Microsoft FrontPage 98 version of this article, see 194091.

For a Microsoft FrontPage 97 and earlier version of this article, see 167594.



IN THIS TASK
SUMMARY
 * Example 1
 * Example 2
 * Example 3
 * Example 4



SUMMARY
This article provides four examples of how to use Microsoft Visual Basic Scripting Edition (VBScript) or JavaScript to create a drop-down control that opens a specific Uniform Resource Locator (URL) based on the choice you make from a list.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers 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 requirements.

To paste the code below into your page, switch to the HTML view in FrontPage and place your insertion point where you want the drop-down control inserted. The drop-down control needs to be inserted after the open body tag:  and before the close body tag:

 back to the top

Example 1
A drop down scripted URL list

  http://www.microsoft.com http://www.msn.com http://www.microsoft.com/frontpage http://www.microsoft.com/support/frontpage   select case document.sendme.dropit.selectedindex case 0 navigate("http://www.microsoft.com") case 1 navigate("http://www.msn.com") case 2 navigate("http://www.microsoft.com/frontpage") case 3 navigate("http://www.microsoft.com/support/frontpage") end select  back to the top

Example 2
   http://www.microsoft.com  http://www.msn.com  http://www.microsoft.com/frontpage <option value="http://www.microsoft.com/support/frontpage"> http://www.microsoft.com/support/frontpage <input type="button" name="B2" value="Go">

 dim choice choice = document.SendMe2.Cleaner.selectedindex navigate document.SendMe2.Cleaner.options(choice).value </SCRIPT> back to the top

Example 3
<script language="JavaScript"> back to the top

Example 4
 </Script> <form method="POST"> <select name="dest" size="1"> Example One Example Two Example Three Example Four Example Five Example Six Example Seven Example Eight Example Nine ExampleHome Page (Do Not Use) Really, Do Not Use This! <INPUT TYPE=BUTTON VALUE="Submit Example" ONCLICK=setaction(form.dest.selectedIndex)> back to the top

Additional query words: kbusage kbhowto kbprg kbnetwork drop down menu dropdown hyper link hyperlink kbcode kbmacro fphtml fpscript listbox list box front page insert form

Keywords: kbscript kbprogramming kbhowtomaster KB197959

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.