2pac
Membro Senior
Registrado
420 Mensagens
0 Curtidas
2pacestou criando uma pagina em PHP e preciso faze-la recarregar quando um usuario escolhe uma opção de uma caixa select,...
function mostra()
{
total = document.form.arquivos.options.length;
for (i=0; i < total; i++)
{
if (document.form.arquivos.options[i].selected)
{
window.location.href = "http://" + document.form.arquivos.options[i].value;
}
}
}
</script>
</head>
<body>
<select name='arquivos' onchange="mostra()">
</select>
<html>
<head>
<script language=javascript>
function recarrega() {
document.formulario.action = "./teste.html";
document.formulario.submit();
}
</script>
</head>
<body>
<form name=formulario method=get>
<select name=selecao onchange="recarrega();">
</select>
</form>
</body>
</html>
jqueirozSem problema: você usa esse evento para submeter os dados, com uma marcação de "parcial". O script de tratamento do f...
<script>
<!-- //
function atualizaSelect(sel,form) {
form.parcial.value = '1';
form.submit();
}
//-->
</script>
<form name="jqueiroz">
<input type='hidden' name='parcial' value=0>
<select onchange='atualizaSelec(this,this.form)'>
<option ...>
<option ...>
...