Originariamente inviato da homezappa
codice:
function Invia(valore) {
  var lnk;
  if (valore == 'CERCA')
    lnk = "http://www.pippo.it/pag1.php";
  else
    lnk = "http://www.pippo.it/pag2.php";
  document.getElementById('test').action = lnk;	
  document.getElementById('test').submit();
}
Mi chiedo ... ma l'id test dove sta?
Se non metti un id alla form, è dura che tu gli possa cambiare al volo la action!

HTH
Zappa

id=test sta nel form vedi qua:
<form name="theForm" onSubmit="return form_validator(this)"
method="post" action="" target="nuova" id="test">