Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML>
- <html>
- <head>
- <title>Registrierung</title>
- <meta name="description" content="Registrierung">
- <style type="text/css">
- .no { color: red; font-size: 14px; }
- .yes { color: #006600; font-size: 14px; }
- </style>
- <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
- <script type="text/javascript">
- $(document).ready(function() {
- $("#username").blur(function() { // Wenn nicht mehr im Fokus
- $("#messageUser").html('Benutzername wird überprüft...'); //Vor Ajax-Antwort
- var form_data = {
- action: 'check_username',
- username: $(this).val()
- };
- $.ajax({
- type: "POST",
- url: "functions.php",
- data: form_data,
- success: function(result) {
- $("#messageUser").html(result);
- }
- });
- });
- $("#pw2").blur(function() { // Wenn nicht mehr im Fokus
- $("#messagePass").html('Passwort wird überprüft...'); //Vor Ajax-Antwort
- var form_data2 = {
- action: 'check_password',
- password1: $("#pw").val(),
- password2: $(this).val()
- };
- $.ajax({
- type: "POST",
- url: "functions.php",
- data: form_data2,
- success: function(result) {
- $("#messagePass").html(result);
- }
- });
- });
- });
- </script>
- </head>
- <body>
- <body>
- <form method="post" name="form1" id="form1" action="">
- <div>
- Username:<br />
- <input type="text" name="username" id="username" value="" autocomplete="off" />
- <div id="messageUser"></div>
- </div>
- <div>
- Passwort:<br />
- <input type="password" name="pw" id="pw" value="" autocomplete="off" />
- </div>
- <div>
- Passwort wiederholen:<br />
- <input type="password" name="pw2" id="pw2" value="" autocomplete="off" />
- <div id="messagePass"></div>
- </div>
- <div>
- <input type="button" id="button1" name="button1" value="submit" />
- </div>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement