Salve.
Avrei bisogno di un vs suggerimento: come faccio a disabilitare un link in base ad un valore inserito in un campo di un form?
Ho scritto così, non dà errori ma la popup non si apre in nessun caso, cioè con il campo `argo` valorizzato o vuoto...codice:<form name="myForm" method="post" action="default.php"> <input type="text" name="argo" size="30"> </p> Aggiungi </p>
Che sbaglio?
codice:function openPopup() { var w = 500; var h = 200; var x = Math.floor((screen.width - w) / 2); var y = Math.floor((screen.height - h) / 2); // Crea/apri il popup if (myForm.argo.value.lenght > 0) { popupWin = window.open("popup.htm", "choices", "width=" + w + ",height=" + h + ",top=" + y + ",left=" + x); } // Attiva il popup (portalo in primo piano) if (popupWin) popupWin.focus(); }

Rispondi quotando