Hat dir diese Antwort geholfen?
Das ist mein Script. Zumindext enthält es keine Fehler. Nur der Inhalt der Funktion wird nicht ausgeführt.
<script language="PHP">
print("
<script language='javascript'>
function details() {
/*var lol=window.document.getElementByName('char');
var Details=window.document.getElementByName('Details')
switch (lol) {
case 1:
{ lol==1
Details.innerHTML=' <table>
<tr><td><img src='paladin.jpg'</td><td>Attribute</td></tr>
<tr><td>Beschreibung</td></tr>
</table>
';
}
case 2:
{ lol==2
Details.innerHTML=' <table>
<tr><td><img src='barbar.jpg'</td><td>Attribute</td></tr>
<tr><td>Beschreibung</td></tr>
</table>
';
}
case 3:
{ lol==3
Details.innerHTML='<table>
<tr><td><img src='druide.jpg'</td><td>Attribute</td></tr>
<tr><td>Beschreibung</td></tr>
</table>
';
}
case 4:
{ lol==4
Details.innerHTML='<table>
<tr><td><img src='firnelf.jpg'</td><td>Attribute</td></tr>
<tr><td>Beschreibung</td></tr>
</table>
';
}
default:
}
*/
}
</script>
<table border='1'>
<tr>
<td align='center'>
<table>
<tr>
<td>Charaktername:</td>
<td><input type='text'></input></td>
<tr>
<tr>
<td>Passwort:</td>
<td><input type='password'></input></td>
<tr>
<tr>
<td>Passwort wiederholen:</td>
<td><input type='text'></input></td>
<tr>
<tr>
<td>E-mail:</td>
<td><input type='text'></input></td>
<tr>
<tr>
<td>Charaktertyp:</td>
<td name='keks'><select name='char' onChange='details(char.value);'>
<option value='' >Bitte auswählen...</option>
<option value='1' >Paladin</option>
<option value='2' >Barbar</option>
<option value='3' >Druide</option>
<option value='4' >Firnelf</option>
</select>
</td>
</tr>
</td>
<td name='Details'>
</td>
</tr>
</table>
");
</script>