General discussion

Locked

Menu Selection

By Gel ·
Need a Javascript for Menu Selection.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Menu Selection

by sphynx In reply to Menu Selection

Put this on your Web page..<HTML>
<HEAD>
<!--exclude-->

<TITLE>Selection from a DropDown List</TITLE>
<SCRIPT Language="javascript">
<!--hide script in comments

// Script Author - Angie_sarreal@yahoo.com
// this script is Public Domain// Chooses a Web Site Location to Place in the designated frame
function selectaplace(form) {

var formindex=form.thislocation.selectedIndex;

//ignore the top ( 0th item ) [ it doesn't go anywhere anyway ]
if(formindex > 0){

parent.fr2.location=form.thislocation.options[formindex].value;}

}

// Chooses a Web Site Location to Place in a New Window

function selectToNewWindow(form) { //default is 0; what loads is determined by OPTION SELECTED VALUE

var formindex=form.thislocation.selectedIndex;

//ignore the top ( 0th item ) [ it doesn't go anywhere anyway ]
if(formindex > 0){
window.open(form.thislocation.options[formindex].value,"blank","menubar=yes,status=yes,location=yes,resizable=yes,scrollbars=yes");}

}

//Chooses a Web Site Location to Place without requiring a "GO" button
//to the current window

function selectinthisWindow(form) { //default is 0; what loads is determined by OPTION SELECTED VALUE

var formindex=form.thislocation.selectedIndex;

//ignore the top ( 0th item ) [ it doesn't go anywhere anyway ]
if(formindex > 0) {

window.location=form.thislocation.options[formindex].value;}

}
// -->End Script
</SCRIPT>

Send the Head on your mail..

Collapse -

Menu Selection

by Gel In reply to Menu Selection

Poster rated this answer

Collapse -

Menu Selection

by Gel In reply to Menu Selection

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums