Autoselect and jQuery post doesnt work together

nubclolug

New Member
I have another problem with my code.\[code\] <script type="text/javascript"> $("#wojewodz").change(function(){ var id_wojewodztwa = $("#wojewodz").children(":selected").attr("id"); $.post("miasta.php", { id_wojewodztwa: id_wojewodztwa } ); $('#powiat_miasto_auto_complete').autocomplete({source:'miasta.php', minLength:2}); }); </script>\[/code\]this is functions which get ID of selected select and transfering it to miasta.php \[code\]$options = array( PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',); try { $conn = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpass, $options);}catch(PDOException $e) { echo $e->getMessage();}$return_arr = array();if (($conn) and (isset($_GET['id_wojewodztwa']))){ $id_wojewodztwa = $_GET['id_wojewodztwa']; $ac_term = "%".$_GET['term']."%"; $query = "SELECT DISTINCT nazwa FROM podzial_tm where woj='$id_wojewodztwa' and nazdod!='wojew
 
Back
Top