Hi All,

I have a form that has a drop down "select" for cust_name. When that drop down is clicked the value of the customer id goes into a PHP variable called $cust_id.

I am trying to use jQuery ".change" to load a new section of code when the customer name is changed. The load works great. But what I also need to do is capture the value of the $cust_id from the "value=" attribute so that in the loaded page I can execute a MySQL routine to retrieve the rest of the customer data. Here is a snippet of the relevant code:
jQuery routine which does not work:

$('#custid').change(function(event) {
// Get the custid from the value
var custid = $(this).attr("value");
// Send Ajax request to apply-payments.php, with custid set as "cust_id" in the POST data
$.post("display-property.php", {"cust_id": custid});
//Now load the div for the property display
//This part works fine

here is the form select routine:

<form method="post" action="#">
<legend>Customer ID</legend>
<select title="Cust ID" name="cust_id" id="custid">

//A MySQL Routine was executed previously to get the values for cust_id below

$cust_id = $row['cust_id'];
<option value="<?php echo $cust_id ?>"> <?php echo $cust_id_dis ?> </option>

if you need anything else to assit me with this please let me know.

Thanks in advance for your help