Button für onInputprocessing wird nicht bei Return betätigt.

BusinessServerPages; Erstellung von Webapplikationen.

Button für onInputprocessing wird nicht bei Return betätigt.

Postby Milla4157 » Tue Feb 28, 2006 3:00 pm

Hallo,

ich habe ein Eingabefeld mit Submit-Button. Wenn ich Return drücke, wird der Eingabewert überprüft,(Funktion check()), ob er 10 stellig ist, wenn nicht, wird er automatisch auf 10 stellig erweitert, und der Submit-Button wird dann betätigt.

Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. <Form name="show" method = "post" onsubmit="return check&#40;this.input&#41;">
  2.  
  3. <table align="center" border=0>
  4.  <tr>
  5.  <td algin="center">Input:</td>
  6.  <td algin="center"><input type="text" size="30" name="input" ></td>
  7.  <td algin="center"><input type="submit"  name="OnInputProcessing" value="Anzeigen"></td>
  8.  
GeSHi ©


Problem ist es jetzt, dass Submit-Button wird nicht betätigt wenn ich return drücke, woran liegt das? Kann jemand mir einen Vorschlag geben? Danke im voraus

Gruss
Milla4157
..
..
 
Posts: 15
Joined: Tue Jan 17, 2006 6:12 pm

Re: Button für onInputprocessing wird nicht bei Return betät

Postby Luisa3993 » Tue Feb 28, 2006 5:22 pm

Hallo sapfuns,
vermutlich geht es nur so:
Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. <%-- ******************************************************
  2. *          drücken der Entertaste                         *
  3. ****************************************************** --%>
  4. <body      onKeyPress          =   "JavaScript:ENTER&#40; &#41;">
  5. <script    type                =   "text/javascript">
  6. function   ENTER&#40; &#41;
  7.   &#123; if    &#40;event.keyCode       ==   13&#41;
  8.            document.getElementById&#40;"BU_ENTER"&#41;.click&#40; &#41;;
  9.   &#125;
  10. </script>
  11. </body>
  12.  
GeSHi ©

Falls es doch eine andere/bessere Lösung gibt,
dann wäre ich auch daran interessiert.
Gruß RoBu di AQu
Luisa3993
..
..
 
Posts: 37
Joined: Thu Jul 14, 2005 1:36 pm


Return to BSP + BHTML

Who is online

Users browsing this forum: No registered users and 7 guests