View Single Post
Old 09-12-2012, 09:45 PM   PM User | #2
devnull69
Senior Coder

 
Join Date: Dec 2010
Posts: 2,245
Thanks: 10
Thanked 531 Times in 525 Posts
devnull69 will become famous soon enough
You should look at your HTML code ... the selected text might be "Gila Bend", but .val() will get the value property from the option, which might be different from the visible text

Example
Code:
<select id="selected_city">
   <option value="Gila">Gila Bend</option>
</select>
If your option value is OK, you should always encode parameters that you want to transfer via a URL using the encodeURIComponent() method
Code:
$("div#divCustomerInfo").load("GetCustomerData.php?id=" + encodeURIComponent(Id))

Last edited by devnull69; 09-12-2012 at 09:53 PM..
devnull69 is offline   Reply With Quote