selecting an option from a combo box

P

Philippe

I am a novice to VB scripting and front page, here is my challenge:
- I created a select tag and added several options to it
-I did set one option as the selected one.
I would like the user to go to another page after he/she clicks the selected
option.
Please advice.
P.S.
I did use the comboname_onselectstart event but it is not working as expected.
Thank you for your help.
 
S

Steve Easton

actually you want javascript not VB.
Try this:

<p align="center">
<select id="setit" Onchange="window(setit.options[setit.selectedIndex].value)">
<option selected>Select a page</option>
<option value="page1.htm">Page 1</option>
<option value="page2.htm">Page 2</option>
<option value="page3.htm">Page 3</option></select>
</p>

Edit the file names as appropriate.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
P

Philippe

Thank you, I tried the vb script option and it worked.

Steve Easton said:
actually you want javascript not VB.
Try this:

<p align="center">
<select id="setit" Onchange="window(setit.options[setit.selectedIndex].value)">
<option selected>Select a page</option>
<option value="page1.htm">Page 1</option>
<option value="page2.htm">Page 2</option>
<option value="page3.htm">Page 3</option></select>
</p>

Edit the file names as appropriate.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer

Philippe said:
I am a novice to VB scripting and front page, here is my challenge:
- I created a select tag and added several options to it
-I did set one option as the selected one.
I would like the user to go to another page after he/she clicks the selected
option.
Please advice.
P.S.
I did use the comboname_onselectstart event but it is not working as expected.
Thank you for your help.
 

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

Top