![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 381 Pomógł: 12 Dołączył: 9.07.2007 Ostrzeżenie: (0%) ![]() ![]() |
Witam,
od razu zacznę że nie mam kompletnego pojęcia o AJAX'ie (IMG:style_emoticons/default/sad.gif) A szukam jak sprawdzić nie wysyłając formularza czy podany e-mail istnieje w bazie, chciałbym aby przy kliknięciu w <input type="submit" /> wyskoczył alert js. Jak coś takiego najprościej uzyskać ? |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 381 Pomógł: 12 Dołączył: 9.07.2007 Ostrzeżenie: (0%) ![]() ![]() |
W sumie to niby coś znalazłem
Kod $(document).ready(function(){ $("#email").change(function(){ var email = $("#email").val(); if(email.length > 3){ $("#status").html(\'Trwa sprawdzanie...\'); $.ajax({ type: "POST", url: "email.php", data: "email="+ email, success: function(server_response){ $("#status").ajaxComplete(function(event, request){ if(server_response == \'0\'){ $("#status").html(\'<font color="Green">Available</font>\'); CheckEmail = true; } else if(server_response == \'1\'){ $("#status").html(\'<font color="red">Not Available</font>\'); CheckEmail = false; } }); } }); } else { $("#status").html(\'<font color="#cc0000">Username too short</font>\'); CheckEmail = false; } return false; }); Ale nie wiem dokładnie jakim POSTem te dane są przesyłane żeby zrobić if(isset($_POST['co tu ?'])){} |
|
|
![]() ![]() |
![]() |
Aktualny czas: 11.10.2025 - 10:15 |