JavaScript-Script will einfach nicht... |
tom-s
Mitglied
Dabei seit: 26.01.08
Beiträge: 42
Herkunft: Berlin, Deutschland
|
|
Hi!
Ich habe vor ewig langer Zeit das Projekt 'Our Class online' in's Leben gerufen...
Es sollte damals als Klassen-HP für meine Klasse dienen.
Ich habe es dann nach 1 Jahr umbenannt in 'Our Clan online', weil es zu wenige User waren, und man sich nur anmelden konnte, wenn man in der Klasse war...
Nun seit der Umbenennung hat das Projekt mehere Überarbeitungen und auch 1 Provider-Wechsel erlitten!
Ich habe vor 2 Monaten wieder eine Überarbeitung gemacht, um alles 'noch professioneller' und auch 'sicherer' zu machen!
Nun, ich benutze 'HTML', 'CSS', 'JavaScript', 'PHP5', 'SQL', um die Seite zu bauen.
Ich bin im Moment bei der Anmeldung, Schritt 3: "Persönliche Daten"...
Nun, ich wollte in diesem Schritt eigentlich 3 JavaScript "Effekte" einbauen, aber es klappt einfach nicht!
Die JS-Fehler habe ich schon beseitigt, aber es scheint etwas mit der "Grammatik" nicht zu stimmen...
Es zeigt mir nichteinmal das Alert "hi_general_1" (Ich habe Test-Alerts eingebaut) an,
obwohl es die einzige Anweisung außerhalb der Funktionen ist...
Meine HP ist genial ( ), aber das Script will einfach nicht funzen...
Es ist so, als ob JavaScript sich auf dieser Seite einfach deaktiviert...
Kann mir wer helfen?
Hier wär das Script (Schritt 3 der Anmeldung):
code: |
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:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
|
<?php
if ($_SESSION['sys_auth'] == "true2.fin") {
require("/var/www/web116/html/inc/main1_1.php");
?>
<script language="JavaScript" type="text/javascript">
alert("hi_general_1");
function Add (field) {
alert("hi_add_1");
switch (field) {
case 'adresse':
adress2.innerHTML = "<b>\nStraße und HausNr [2]:\n</b>\n<br>\n<input type=\"text\" name=\"strasse2\">\n \n<input type=\"text\" name=\"hausnr\" size=\"5\">\n<br>\n<br>\n \n<b>\nPLZ und Ort [2]:\n</b>\n<br>\n \n<input type=\"text\" name=\"plz2\" size=\"5\">\n \n<input type=\"text\" name=\"ort2\">\n";
case 'tel':
tel2.innerHTML = "<b>\nTelefonNr [2]:\n</b>\n<br>\n<input type=\"text\" name=\"tel2\">\n";
}
}
function LoadOn() {
alert("hi_loadon_1");
birthday.innerHTML = "Monat:\n<br>\n<select name=\"birth_month_extra\" size=\"1\">\n<option onclick=\"Birth('month', '1');\">Januar</option>\n<option onclick=\"Birth('month', '2');\">Februar</option>\n<option onclick=\"Birth('month', '3');\">März</option>\n<option onclick=\"Birth('month', '4');\">April</option>\n<option onclick=\"Birth('month', '5');\">Mai</option>\n<option onclick=\"Birth('month', '6');\">Juni</option>\n<option onclick=\"Birth('month', '7');\">Juli</option>\n<option onclick=\"Birth('month', '8');\">August</option>\n<option onclick=\"Birth('month', '9');\">September</option>\n<option onclick=\"Birth('month', '10');\">Oktober</option>\n<option onclick=\"Birth('month', '11');\">November</option>\n<option onclick=\"Birth('month', '12');\">Dezember</option>\n";
alert("hi_loadon_2");
birth_values.innerHTML = "<input type=\"hidden\" name=\"birth_day\">\n<input type=\"hidden\" name=\"birth_month\">\n<input type=\"hidden\" name=\"binth_year\">\n";
alert("hi_loadon_3");
}
function Birth (type, num) {
alert("hi_birth_1");
var days;
switch (type) {
case 'month':
birthday.innerHTML = "Jahr:\n<br>\n" + num + "<input type=\"text\" name=\"birth_year_extra\" onkeyup=\"Birth('year');\">\n";
birth_month.value = num;
case 'year':
if (birth_year_extra.length == 4) {
birth_year.value = birth_year_extra.value;
days = 0;
switch (birth_month.value) {
case '1':
days = 31;
case '2':
if (birth_year.value % 4 == 0) {
days = 29;
}
else {
days = 28;
}
case '3':
days = 31;
case '4':
days = 30;
case '5':
days = 31;
case '6':
days = 30;
case '7':
days = 30;
case '8':
days = 31;
case '9':
days = 30;
case '10':
days = 31;
case '11':
days = 30;
case '12':
days = 31;
}
birthday.innerHTML = "Tag:\n<br>\n<select name=\"birth_day_extra\" size=\"1\">\n<option onclick=\"Birth('day', '1');\">1.</option>\n<option onclick=\"Birth('day', '2');\">2.</option>\n<option onclick=\"Birth('day', '3');\">3.</option>\n<option onclick=\"Birth('day', '4');\">4.</option>\n<option onclick=\"Birth('day', '5');\">5.</option>\n<option onclick=\"Birth('day', '6');\">6.</option>\n<option onclick=\"Birth('day', '7');\">7.</option>\n<option onclick=\"Birth('day', '8');\">8.</option>\n<option onclick=\"Birth('day', '9');\">9.</option>\n<option onclick=\"Birth('day', '10');\">10.</option>\n<option onclick=\"Birth('day', '11');\">11.</option>\n<option onclick=\"Birth('day', '12');\">12.</option>\n<option onclick=\"Birth('day', '13');\">13.</option>\n<option onclick=\"Birth('day', '14');\">14.</option>\n<option onclick=\"Birth('day', '15');\">15.</option>\n<option onclick=\"Birth('day', '16');\">16.</option>\n<option onclick=\"Birth('day', '17');\">17.</option>\n<option onclick=\"Birth('day', '18');\">18.</option>\n<option onclick=\"Birth('day', '19');\">19.</option>\n<option onclick=\"Birth('day', '20');\">20.</option>\n<option onclick=\"Birth('day', '21');\">21.</option>\n<option onclick=\"Birth('day', '22');\">22.</option>\n<option onclick=\"Birth('day', '23');\">23.</option>\n<option onclick=\"Birth('day', '24');\">24.</option>\n<option onclick=\"Birth('day', '25');\">25.</option>\n<option onclick=\"Birth('day', '26');\">26.</option>\n<option onclick=\"Birth('day', '27');\">27.</option>\n<option onclick=\"Birth('day', '28');\">28.</option>\n";
if (days >= 29) {
birthday.innerHTML .= "<option onclick=\"Birth('day', '29');\">29.</option>\n";
}
if (days >= 30) {
birthday.innerHTML .= "<option onclick=\"Birth('day', '30');\">30.</option>\n";
}
if (days > 30) {
birthday.innerHTML .= "<option onclick=\"Birth('day', '31');\">31.</option>\n";
}
}
case 'day':
birth_day.value = num;
birthday.innerHTML = "Danke für die Angabe deines Geburtstags!\n<br>\n<br>\n<a class=\"backlink\" onclick=\"LoadOn();\">\nHalt! Ich habe mich vertippt!\n</a>\n";
}
}
</script>
<?php
require("/var/www/web116/html/inc/main1_2.php");
?>
<a class="backlink" href="/index.php/start">
Anmeldung
</a>
>
Schritt 3
<?php
require("/var/www/web116/html/inc/main1_3.php");
?>
<h2>
Anmeldung
</h2>
<h3>
Schritt 3
</h3>
Willkommen zu Schritt 3!
<br>
Hier musst du deine <b>Persönlichen Daten</b> angeben...
<br>
<br>
Viel Spaß!
<br>
<br>
<form name="f-step3" method="POST" action="/index.php/reg/step3,send">
<b>
Geschlecht:
</b>
<br>
<select name="geschlecht" size="2">
<option value="1">Junge</option>
<option value="2">Mädchen</option>
</select>
<br>
<br>
<b>
Name:
</b>
<br>
<b>
Vorname:
</b>
<br>
<input type="text" name="vorname">
<br>
<br>
<b>
Nachname:
</b>
<br>
<input type="text" name="nachname">
<br>
<br>
<b>
Adresse:
</b>
<br>
<b>
Straße und HausNr [1]:
</b>
<br>
<input type="text" name="strasse1">
<input type="text" name="hausnr1" size="5">
<br>
<br>
<b>
PLZ und Ort [1]:
</b>
<br>
<input type="text" name="plz1" size="5">
<input type="text" name="ort1">
<br>
<br>
<span id="adress2">
<a class="backlink" href="javascript:Add('adresse');">
Adresse hinzufügen!
</a>
</span>
<br>
<br>
<b>
Telefon:
</b>
<br>
<b>
TelefonNr [1]:
</b>
<br>
<input type="text" name="telnr1">
<br>
<br>
<span name="tel2">
<a class="backlink" href="javascript:Add('tel');">
TelefonNr hinzufügen!
</a>
</span>
<br>
<br>
<b>
Geburtstag:
</b>
<br>
<div name="birthday">
<noscript>
<input type="text" name="birth_day" size="2">
.
<input type="text" name="birth_month" size="2">
.
<input type="text" name="birth_year" size="4">
<br>
Beispiel: 19.08.1604
</noscript>
</div>
<div name="birth_values">
</div>
<br>
<br>
<input class="button" type="submit" name="submit" value="Weiter!">
</form>
<?php
require("/var/www/web116/html/inc/main1_4.php");
}
else {
require("/var/www/web116/html/inc/main1_1.php");
?>
<script language="JavaScript" type="text/javascript">
function code_continue(field) {
if (field == 1) {
if (code1.value.length == 6) {
code2.focus();
}
}
else if (field == 2) {
if (code2.value.length == 4) {
code3.focus();
}
}
}
</script>
<?php
require("/var/www/web116/html/inc/main1_2.php");
?>
<a class="backlink" href="/index.php/start">
Anmeldung
</a>
>
Schritt 1
<?php
require("/var/www/web116/html/inc/main1_3.php");
?>
<h2>
Anmeldung
</h2>
<h3>
Schritt 1
</h3>
<div id="outstanding" style="background-color: #FF0000;">
<h4>
Fehler
</h4>
Fehler aufgetreten:
<br>
<ul>
<li>
Es ist ein Schwerwiegender Fehler aufgetreten, der beweißt, dass du in der Anmeldung schummeln wolltest...
</li>
</ul>
</div>
Super, dass du dich nun anmelden willst!
<br>
In Schritt 1 musst du einen <b>gültigen OCcode</b> und deine <b>E-Mail Adresse</b> angeben.
<br>
<br>
<form name="f-step1" method="POST" action="/index.php/reg/step1,send">
<b>
OCcode:
</b>
<br>
<input type="text" name="code1" id="code1" size="6" maxlength="6" onkeyup="code_continue(1);">
-
<input type="text" name="code2" id="code2" size="4" maxlength="4" onkeyup="code_continue(2);">
-
<input type="text" name="code3" id="code3" size="5" maxlength="5">
<br>
<a class="backlink" onclick="window.open('http://extra.tom.bbping.de/index.php/help/2', 'Our Clan online');">
Ich habe keinen OCcode...
</a>
<br>
<br>
<b>
E-Mail Adresse:
</b>
<br>
<input type="text" name="email">
<br>
<i>
[Die angegebene E-Mail Adresse muss korrekt sein, da an dieselbe eine Bestätigungsmail gesendet wird]
</i>
<br>
<br>
<input class="button" type="submit" name="submit" value="Weiter!">
</form>
<?php
require("/var/www/web116/html/inc/main1_4.php");
}
|
|
Weiß vielleicht jemand was da zutun ist???
Falls es hier mit dem Code-Anzeigen nicht so gut klappt, nehmt doch einfach das Dateidownload 'step3.php'...
Wer die HP sehen will: http://www.tom.bbping.de/
Die Anmeldung unter: http://register.tom.bbping.de/
Danke, im Voraus,
Tom S.
Dateianhang: |
step3.php (9 KB, 1 mal heruntergeladen)
|
__________________ Mal ganz im geheimen... I love proggen!!!
|
|
28.01.08 15:05 |
E-Mail
Finden
Als Freund hinzufügen
|
|
tom-s
Mitglied
Dabei seit: 26.01.08
Beiträge: 42
Herkunft: Berlin, Deutschland
Themenstarter
|
|
Hey Dizzy,
klar kann ich dir einen geben...
Aber hast du dir die Erklärung durchgeschaut?
Wenn ja, solltest du wissen, dass du entweder einen User-OCcode eingibst, das heißt, dass du geworben wurdest, oder du gibst einen "Spezial OCcode" ein, so kannst du z.B. HochAdmin, Admin oder Moderator (mehr noch nicht) werden, also, ich weißt jetzt nicht!
User gibt es - klar noch keine, das heißt, dass du nicht von jemandem geworben werden kannst...
Welchen willst du denn, Moderator, Admin oder HochAdmin?
(Kommst ja nach Schritt 3 eh noch nicht weiter...)
Egal welchen, sag's mir, ich geb' ihn dir dann per PN...
Bitte,
Tom S.
__________________ Mal ganz im geheimen... I love proggen!!!
|
|
28.01.08 15:46 |
E-Mail
Finden
Als Freund hinzufügen
|
|
tom-s
Mitglied
Dabei seit: 26.01.08
Beiträge: 42
Herkunft: Berlin, Deutschland
Themenstarter
|
|
Hey Dizzy!
Das, was du da behauptest, kann überhaupt nicht sein!
Zum Teil, weil der OCcode 11111-111-111 nicht die korrekten Längen hat...
Außerdem wird der Code noch nicht nach der Eingabe überprüft...
Erst nach E-Mail Bestätigung...
Unmöglich, dass das geht,
Tom S.
__________________ Mal ganz im geheimen... I love proggen!!!
|
|
28.01.08 15:58 |
E-Mail
Finden
Als Freund hinzufügen
|
|
|