miguelleeuwe
Programmer
hello,
I have a form that's reloaded when I fill a country in a <select>, so I can limit the number of possible timezones which a have in another <select>. this works fine using a reload function that I found somewhere, but the problem I have is that all other previously filled values of the form are blanked... Can someone tell me how to do reload, showing all previous values?
TIA,
Miguel (newby)
<select style="width: 340px;" name="nac_pais"
class="estilo_input" onchange="reload(this.form)">
<option value=""></option>
<?php while($fila = mysql_fetch_array($paises))
if($fila['id_pais']==@$nac_pais)
{
echo "<option selected value='$fila[id_pais]'>$fila[descripcion]</option>"."<BR>";
}
else
{
echo "<option value='$fila[id_pais]'>$fila[descripcion]</option>";
}
this is the reload function:
---------------------
<script language="JavaScript">
function reload(form)
{
var val=form.nac_pais.options[form.nac_pais.options.selectedIndex].value;
self.location='registrar_02_ES.php?nac_pais=' + val;
}
</script>
}
regards,
Miguel L.
I have a form that's reloaded when I fill a country in a <select>, so I can limit the number of possible timezones which a have in another <select>. this works fine using a reload function that I found somewhere, but the problem I have is that all other previously filled values of the form are blanked... Can someone tell me how to do reload, showing all previous values?
TIA,
Miguel (newby)
<select style="width: 340px;" name="nac_pais"
class="estilo_input" onchange="reload(this.form)">
<option value=""></option>
<?php while($fila = mysql_fetch_array($paises))
if($fila['id_pais']==@$nac_pais)
{
echo "<option selected value='$fila[id_pais]'>$fila[descripcion]</option>"."<BR>";
}
else
{
echo "<option value='$fila[id_pais]'>$fila[descripcion]</option>";
}
this is the reload function:
---------------------
<script language="JavaScript">
function reload(form)
{
var val=form.nac_pais.options[form.nac_pais.options.selectedIndex].value;
self.location='registrar_02_ES.php?nac_pais=' + val;
}
</script>
}
regards,
Miguel L.