# Select Box and Ajax Question

**URL:** <https://forum.kirupa.com/t/select-box-and-ajax-question/233052>\
**Category:** web dev\
**Created:** [July 19, 2007, 6:50pm UTC](https://forum.kirupa.com/t/select-box-and-ajax-question/233052 "2007-07-19T18:50:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rschoenbach](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@rschoenbach](https://forum.kirupa.com/u/rschoenbach)\
**Post date:** [July 19, 2007, 6:50pm UTC](https://forum.kirupa.com/t/select-box-and-ajax-question/233052/1 "2007-07-19T18:50:08Z")

</div>

```php
    <?php
    $pikes->query("SELECT award_id, award_name FROM award_desc");
    if ($pikes->get_num_rows() >= 1) {
        echo "<select name=\"award_id\" onChange=sndReqAward(this.selected)>";
        while ($row = $pikes->fetch_row()) {
            echo "<option value\"".$row['award_id']."\">".$row['award_name']."</option>";
        }
        echo "</select>";
    }
    ?>

```

My backend ajax script and front works fine other than one thing.

sndReqAward(this.selected) is broke. Does anybody know the command to return the value that is selected from the option menu?

I know for a textbox - this.value works. This is not the case with select statements. Any help would be great.
