 |
Menu
demonstration
Menu script
Credits
|
|
Sample
Javascript Pull-Down Menu
|
M E
N U D E M O N S T R A T I O N |
Copy the following code to a text editor like Notepad,
then copy the code from the text editor and paste it into the BODY of your HTML
document. In FrontPage, paste while in the HTML view. Customize the menu by modifying the option
values (links) and the names
for the links.
<CENTER>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function selectaplace(form) {
var appname= navigator.appName;
var appversion=parseInt(navigator.appVersion);
if (appname == "Netscape" && appversion >= 3) {
var formindex=form.select1.selectedIndex;
var storage=form.select1.options[formindex].text;
if (form.select1.options[formindex].value != "none") {
var msg=storage+"You are now being transferred to the -> "+storage;
for (var spot=0;spot<msg.length-storage.length;spot++) {
var x=msg.substring(spot,msg.length);
form.select1.options[formindex].text=x;
for(var d=0;d<150;d++) { };
}
window.location=form.select1.options[formindex].value;
form.select1[formindex].text=storage;
} else {
form.select1[formindex].text="Not a real option!";
for(var d=0;d<1250;d++) { };
form.select1[formindex].text=storage;
}
}
else {
var formindex=form.select1.selectedIndex;
window.location=form.select1.options[formindex].value;
}
}
function makeMyMenu() {
document.write ('<form><select name="select1" onChange="selectaplace(this.form)" size=1>');
document.write ('<option value=samples.htm>Sample
Menu
Options');
document.write ('<option value=http://www.west.asu.edu/achristie/>Dr. Christies Home
Page');
document.write ('<option value=http://www.west.asu.edu/achristie/555/index.html>EMC 598 Advanced
Internet');
document.write ('<option value=http://www.west.asu.edu/achristie/555/design.html>Web Design
Resources');
document.write ('<option value=links.htm#clipart>Clipart Internet
Links');
document.write ('</select>');
document.write ('</form>');
}
makeMyMenu();
// End -->
</SCRIPT>
</CENTER>
Script by Website
Abstraction
|