Drop-Down Boxes in FrontPage

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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;
}
}
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top