Thread Daten werden doppelt geschrieben (17 answers)
Opened by palmira_togliatti at 2005-11-11 14:52

palmira_togliatti
 2005-11-11 15:53
#5996 #5996
User since
2005-10-25
10 Artikel
BenutzerIn
[default_avatar]
[quote=renee,11.11.2005, 14:43]Zeig mal den HTML/JS-
Code...

Wie Du siehst, wird das Skript zweimal ausgefuehrt. Somit ist es kein Fehler von Perl, sondern kommt von anderer Stelle...[/quote]

Ungefähr so:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<html>
<head>
<title>Questionnaire</title>
<script type="text/javascript">

function check() {
 if (document.Questions.NameOfTheRespondent.value == "") {
   alert("Please enter your name!");
   document.Questions.NameOfTheRespondent.focus();
   return false;
 }
 if (document.Questions.NameOfTheRC.value == "") {
   alert("Please enter the name of your RC!");
   document.Questions.NameOfTheRC.focus();
   return false;
 }
}
</script>
</head>
<body>
 <form name="Questions" action="[URL=http://www.blabla.de/blabla/index.pl]http://www.blabla.de/blabla/index.pl"[/URL] method="post" onsubmit="return check()" enctype="multipart/form-data">
   <input type="hidden" name="Datum" value="">
   <input type="hidden" name="Zeit">
   <input type="hidden" name="goto" value="[URL=http://www.blabla.de/blabla/pg2.html>]http://www.blabla.de/blabla/pg2.html">[/URL]
          <td width="192"><b>Name of the respondent:</b></td>
          <td width="240"><input type="Text" name="NameOfTheRespondent" value="" size="40" maxlength="300"></td>
          <td width="192"><b>Name of the RC:</b></td>
          <td width="240"><input type="Text" name="NameOfTheRC" value="" size="40" maxlength="300"></td>

<script language="JavaScript">
 var x = new Date();
 var d = x.getDate();
 var m = x.getMonth();
 var j = x.getYear();
 var s = x.getHours();
 var min = x.getMinutes();

    m += 1;
    if (j < 1000)
      j += 1900;{
    aktuellesDatum = d +"." + m + "." + j;
    aktuelleZeit = s + ":" + min;
}
document.Questions.Datum.value = aktuellesDatum;
document.Questions.Zeit.value = aktuelleZeit;
</script>
</body>
</html>
\n\n

<!--EDIT|palmira_togliatti|1131733562-->

View full thread Daten werden doppelt geschrieben