Mam taki problem, odnośnie zrobienia formularza a dokładnie nie całego tylko 1 funkcji Miałem stworzyć formularz z walidacją danych w jquery ( gdzie na stronie jquery jest gotowy validator) następnie poddać komórki walidacji na poprawność i zawartość to zrobiłem i został mi problem że po wszystkim nigdzie nie ma tego wysyłać tylko za pomocą funkcji alert w jquery ma mi to wyświetlić jak fakturę przypuszczalnie czyli nazwę pola i to co się wpisało i z tym mam problem. może mi ktoś pomóc na przykładowym poniżej zamieszam to co udało mi się osiągnąć tylko to wyświetlenie proszę o pomoc
Cytat:HTML
Kod:
<!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" dir="ltr" lang="pl-PL">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Formularz</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen, projection" />
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1.4.4");
</script>
<script src="js/jquery.validate/jquery.validate.js" type="text/javascript"></script>
<script src="js/jquery.validate/messages_pl.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#formularz").validate({
messages: {
imie: {
required: "Proszę uzupełnić pole Imię.",
minlength: jQuery.format("Musi być minimum {0} znaków.")
},
email: {
required: "Proszę uzupełnić pole Adres e-mail.",
email: "Prosze podać prawidłowy adres e-mail, w formacie [email protected]."
},
phone: {
number: "Proszę podać numer telefonu składający z samych cyfr bez spacji."
},
www: {
url: "Prosze wprowadzić prawidłowy adres strony WWW, w formacie http://www.adres.com"
},
content: {
required: "Proszę uzupełnić pole Treść wiadomości.",
minlength: jQuery.format("Musi być minimum {0} znaków.")
}
}
});
});
</script>
</head>
<body>
<form id="formularz" class="formularz" action="thanks.html" method="post">
<fieldset>
<legend>Formularz</legend>
<label for="imie">Imię:</label>
<div><input id="imie" name="imie" type="text" class="required" minlength="3"/></div>
<div class="height_10"> </div>
<label for="email">Adres e-mail:</label>
<div><input id="email" name="email" type="text" class="required email"/></div>
<div class="height_10"> </div>
<label for="phone">Telefon:</label>
<div><input id="phone" name="phone" type="text" class="number" minlength="6"/></div>
<div class="height_10"> </div>
<label for="content">Treść wiadomości:</label>
<div><textarea id="content" cols="20" name="content" rows="5" class="required" minlength="10"></textarea></div>
<div class="height_10"> </div>
<input class="submit" type="submit" value="Wyślij"/>
</fieldset>
</form>
</body>
</html>