Zack
cookies vader
Javascript:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Unbenanntes Dokument</title>
<script type="text/javascript">
/* <![CDATA[ */
function input_text(id){
var element = document.getElementById(id);
element.value="";
}
function input_leave(id, text){
var element = document.getElementById(id);
if(element.value==""){
element.value=text;
}
}
function login(){
alert('test');
var name=document.getElementById('login_name');
var pass=document.getElementById('login_pass');
if(name.value=='Benutzername'){
name.className='text_error';
}
if((pass.value=="")||(pass.value=='Passwort')){
pass.className='text_error';
}
}
/* ]]> */
</script>
</head>
<body>
<form action="index.php" method="post" id="login_form" onsubmit="login();">
<input class="text" type="text" id="login_name" onclick="input_text('login_name');" onblur="input_leave('login_name','Benutzername');" value="Benutzername" name="name" /><br />
<br />
<input class="text" type="password" id="login_pass" onclick="input_text('login_pass');" onblur="input_leave('login_pass','Passwort');" value="Passwort" name="password" /><br />
<br />
<input type="submit" id="login_submit" name="login" value="" />
</form>
</body>
</html>
2 Stunde such ich schon den Fehler warum der JavaScript nicht ausgeführt wird. Sieht jemand das Problem?