question on fp2003 drop-down box

N

Nina Harris

(i'm a new user of frontpage)

how do I make a drop-down box value become automatically the linked to page,
when "submit" is clicked?

to illustrate
1. start new fp2003 session (new_page_1.htm)
2. click Insert, Form, Drop-down box (you get automatically box, and 2
buttons, Submit, Reset)
3. right click on the drop-down box (D1) and select Form Field Properties
4. enter http://www.google.com and click ok

how do I make the page load google when Submit is pressed?

thanks
 
K

Kevin Spencer

3. right click on the drop-down box (D1) and select Form Field Properties

Considering there are a half-dozen form fields in that dialog, I can't for
the life of me figure out which one you typed that URL in!
how do I make the page load google when Submit is pressed?

Not by guesswork, I can tell you that much! ;-)

Create an option with a text and value of "http://www.google.com." Then add
the following attribute to the <select> tag:

onchange="document.location = this.options[this.selectedIndex].value"

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
N

Nina Harris

Kevin Spencer wrote
Create an option with a text and value of "http://www.google.com." Then add
the following attribute to the <select> tag:
onchange="document.location = this.options[this.selectedIndex].value"

so the entire tag now looks like
< select suze="1" name="D1"
onchange="document.location = this.options[this.selectedIndex].value" >

nope, that does not work
 
M

MD Websunlimited

Nina,

That should work provided the option has a value and text.

<option value=http://www.google.com> Google</option>

--
Mike -- FrontPage MVP '97-'02
J-Bots 2004 Released Special Pricing
http://www.websunlimited.com
FrontPage Add-ins Since '97 FP 2003 / 2002 / 2000 Compatible


Nina Harris said:
Kevin Spencer wrote
Create an option with a text and value of "http://www.google.com." Then add
the following attribute to the <select> tag:
onchange="document.location = this.options[this.selectedIndex].value"

so the entire tag now looks like
< select suze="1" name="D1"
onchange="document.location = this.options[this.selectedIndex].value" >

nope, that does not work
 
N

Nina Harris

MD Websunlimited wrote
<option value=http://www.google.com> Google</option>

it does (including quotes) have the above value
the way I did get it to work was to move the size and name to the end of the
tag

<select onchange="document.location =
this.options[this.selectedIndex].value" size="1" name="D1">

now, follow-up to same
suppose I placed this into a frame on left side, how could I open the target
on the right side frame?

pseudocode sample (something like this perhaps?)
<select onchange="main.document.location =
this.options[this.selectedIndex].value" size="1" name="D1">
or would I use target="main" inside the select tag?
 
S

Steve Easton

Cool.

However you might want to consider using an onclick event with a Go button because: People who use a
keyboard instead of a mouse will only be able to select the top item in the dropdown. If you use
onchange, the instant they arrow down to the first selection, it will fire the onchange event.



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

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