Normalde benim formu 4 karakterden altında iken onu göndermek için kullanıcıların engelledi. Ben onlar dize "BUSCA tu Ciudad" gönderiyorsunuz zaman formu göndererek onları engelleyen bir ikinci koşulu eklemek istiyorum. Ben aşağıda şartını ekledi denedim ama işe yaramadı.
<form role="search" method="get" action="http://chusmix.com/" onsubmit="if (document.getElementById('s').value.length < 4) return false;" style="float:right; display:inline; padding-right:10px;">
<input class="ubicacion" name="s" id="s" tabindex="1" onsubmit="if ((document.getElementById('s').value.length < 4) || (document.getElementById('s')== 'Cambiá de ciudad')) return false;" onfocus="if (this.value=='Cambiá de ciudad') this.value = ''" onblur="if(this.value == '') this.value = 'Cambiá de ciudad'" type="text" maxlength="80" size="28" value="Cambiá de ciudad" style="width:198px; color:grey;">
<input type="submit" id="searchsubmit" value="Buscar" />
</form>
Ben yanlış ne yapıyorum? Teşekkürler