phpbar.de logo

Mailinglisten-Archive

[php] PHP-Formular - Enter-Taste

[php] PHP-Formular - Enter-Taste

Thomas Gigold php_(at)_phpcenter.de
Thu, 14 Mar 2002 10:40:39 +0100


Hi

Hab das Script

<script>
function submitform(taste)
{ if (document.layers)
    {if (taste.which == "13")
        { self.document.login.submit();
		  return false;}
     else; }
  else
    {if (window.event.keyCode == "13")
       { self.document.login.submit();
         return false;}
    }
}
  
if (nc) {  
  window.captureEvents(Event.KEYPRESS);
  window.onkeypress = submitform;
  }
</script>

<form>
<input type="text" name="Benutzername" size="10" class="input150"
onkeypress="submitform()">
</form>


das ### onkeypress="submitform()" ### _NUR_ in das letzte Eingabefeld
setzen!

Gruss

thomas


php::bar PHP Wiki   -   Listenarchive