dropdown list in javascript & php (symfony 1.4) -


here's problem :

in default dropdown list have value "1". problem when select in dropdown list value "2", page reloads correctly in view gives me value "1" in list.

code javascript :

   function filter(){ var id = document.getelementbyid('liste-biens').options[document.getelementbyid('liste-biens').selectedindex].value;     var url = "<?php echo html_entity_decode($url); ?>"+id; window.location =url; 

}

code php :

<select id="liste-biens" onchange="javascript:filter();"><?php         foreach($datalevels $level){             $lib_immeuble_value = $level->getattribute('lib_immeuble');             $codimm_immeuble_value = $level->getattribute('cod_immeuble');             $codimmcop_immeuble_value = $level->getattribute('cod_imm_cop');              if ($libimm->getdisplay()){                 ?><option  <?php                 if($current_code_imm == $level->getattribute('cod_imm_cop')){ echo 'selected="selected"'; }                 ?>value="<?php echo $level->getattribute('cod_imm_cop');?>"><?php                     echo $level->getattribute('lib_immeuble') . ' - ' .                          $level->getattribute('adr1_immeuble') . ' -  ' .                          __("immeuble") . ' ' . str_pad(html_entity_decode($level->getattribute('cod_immeuble')),5,"0",str_pad_left) . '/' .                         __("client") . ' ' .str_pad(html_entity_decode($level->getattribute('codcli_immeuble')),7,"0",str_pad_left) . '/' .                          __("copropriétaire") . ' ' . str_pad(html_entity_decode($level->getattribute('codcop_immeuble')),7,"0",str_pad_left);                  ?></option><?php             }         }     ?></select><?php 


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -