Drop-Down Boxes in FrontPage

H

Holly

I have created three drop-down boxes within my webpages. However, I'm unable
to link to the choices. I have entered the URL in the Specify Value Box. Is
this correct?
 
L

lloydsphoto.net

The specify value is for code such as javascript. You will need to set drop
down box onchange event. such as;
<select size="1" name="ctgryDBx" id="fp1" onchange="javascript:runcode();">
Where runcode is the javascript function.
Then create the function:

function runcode(){
val = document.formname.dropDownBoxName.value;
switch (val){
case item1Value:
window.navigate(URL);
break;
case item2Value:
window.navigate(URL);
break;
}
}
 
L

lloydsphoto.net

Sorry Holly, I hadnt thought of this before but,,,
rather than going thru all that function stuff. Since you already have the
URL's as values, You might try just putting the window.navigate() in your
html tag <select>
like this;
<select size="1" name="drpDwnBx1" id="fp1"
onchange="javascript:window.navigate(this);">

the word "this" is a javascript keyword that will supply the function
window.navigate() with the value supplied by the selection in your drop down
box.
Try it, I believe it may work better.
 
Top