<?php 
include'aut_config.inc.php';?> 
		<script src="https://code.jquery.com/jquery-3.2.1.js"></script>

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
        <script src="js/html5shiv.js"></script>
        <script src="js/respond.min.js"></script>
        <![endif]-->
	<script language="javascript">
		$(document).ready(function(){
			$("#cod_rubro").on('change', function () {
				$("#cod_rubro option:selected").each(function () {
					elegido=$(this).val();
					$.post("combo_modelos.php", { elegido: elegido }, function(data) {
						$("#cod_marca").html(data);
					});			
				});
		   });  

		});
	</script>
	                                                <div class="col-sm-4">
												      <select id="cod_rubro" name='cod_rubro'  class='form-control' required="required">
														<option value="">Seleccione el rubro</option>
													<?php	$consulta_rubro_x1=mysql_query("select * from tabla_rubro_categoria where eliminar=0",$link);
															while($ver_consulta_rubro_x1=mysql_fetch_array($consulta_rubro_x1)){ 
													?>
															<option value="<?php echo $ver_consulta_rubro_x1['id']; ?>"  ><?php echo $ver_consulta_rubro_x1['nombre']; ?></option>
													<?php  } ?>
													</select>
												</div>  
                                                <div class="col-sm-4">
													<select name="cod_marcas" id="cod_marca" class="form-control"  required='required'>
														<option value="">Selecciones una opcion</option>
													</select>
												</div> 