两个选择框与ajax

I need your help with ajax select box please.

I have 2 selectboxs:

  1. area

  2. cities

when I choose area the option in the CITIES selectbox change accourding the area I chose.

It's work OK, But when I load the page (for i.e: edit the data) I don't see the right city (the selectbox pointer stand on the first city in the list accourding the DB area that I chose before).

What do I need to change?

Thanks

Client Site:

<p><label>Area</label> 
    <select name='areaID' id='areaID'>
        <?PHP
        $query = mysql_query("SELECT * FROM `areas` ORDER BY id ASC "); 
        while($index = mysql_fetch_array($query)) 
        {
            $db_area_id = $index['id'];
            $db_area_name = $index['name'];
            if ($db_area_id == $userDetails['areaID'])
                echo "<option value='$db_area_id' selected>$db_area_name</option>";         
            else    
                echo "<option value='$db_area_id'>$db_area_name</option>";
        }
        ?>
    </select><span>*</span>
</p>

<p><label>City</label>
    <select id='cityID' name='cityID'>  </select>
</p>


<script>
$(function () {
    function updateCitySelectBox() {
        var areaID = $('#areaID').val();
        $('#cityID').load('ajax/getCities.php?areaID=' + areaID);

        return false;
    }

    updateCitySelectBox();
    $('#areaID').change(updateCitySelectBox);
});
</script>

Server Side:

$areaID = (int) $_GET['areaID'];

$second_option = "";

$query2 = mysql_query("SELECT * FROM `cities` WHERE area_id = $areaID ORDER BY id ASC");
while($index = mysql_fetch_array($query2)) 
{
    $id = $index['id'];
    $name  = $index['name'];
    $second_option .= "<option value='$id'>$name</option>";

}
echo $second_option;

Try to add following line of code. you need to call the function at the time of window load.

$(document).ready(function(){
    window.load = updateCitySelectBox();
});