Page 1 of 1

Why Is This Pull Down Menu Displayed In The Opposite Directi

Posted: Sun May 22, 2011 4:37 pm
by drayarms
I'm trying to create this form with three pull down menus. The first pull down menu has the heading "Seeking A" with options "Man" and "Woman". The second and third pull down menus age ranges from 18 to 99 years. Everything works ok, except that the age pull down menus display the ages upwards instead of downwards as should be expected. What could possibly be the problem. I have the form displayed below.

Code: Select all

<form id="search_profiles_form" action= "profile_search.php">
02
 
03
 
04
 
05
 
06
 
07
                            Seeking A:
08
                            <select name= "sex">
09
                                <option value= "man">Man</option>
10
                                <option value= "woman">Woman</option>
11
                                <option value= "both">Both</option>
12
                            <select>  
13
 
14
 
15
                            <p> <tab> Age Range: <?php
16
                            print '<select name= "min_age">';
17
                            for ($age = 18; $age <= 99; $age++) {
18
                                print "\n<option value=\"$age\">$age</option>";
19
                            }
20
                            print '</select>'; ?> </tab>
21
 
22
                            <tab> and: <?php
23
                            print '<select name= "max_age">';
24
                            for ($age = 18; $age <= 99; $age++) {
25
                                print "\n<option value=\"$age\">$age</option>";
26
                            }
27
                            print '</select>'; ?> </tab> </p>
28
 
29
</form>


Re: Why Is This Pull Down Menu Displayed In The Opposite Dir

Posted: Sun May 22, 2011 9:36 pm
by califdon
for ($age = 18; $age <= 99; $age++) {
You are starting with 18, so that's at the top, and incrementing $age until it reaches 99, which is at the bottom. If that is not what you want, you can start at 99 and decrement $age until it reaches 18. I guess I don't understand what you want.

Re: Why Is This Pull Down Menu Displayed In The Opposite Dir

Posted: Mon May 23, 2011 1:59 pm
by drayarms
@califdon, You probably didn't understand me. What I meant was when I click the little arrow to display the pull down menu, the column holding the contents of the menu are displayed above instead of below the input box. So I get a pull up (if there is any such phrase) menu instead of a pull down menu. Hope that better explains it.

Re: Why Is This Pull Down Menu Displayed In The Opposite Dir

Posted: Mon May 23, 2011 2:09 pm
by McInfo
That is normal behavior for menus that are close to the bottom of the screen.