Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [js][php] dialog box-y
max_mcee
post
Post #1





Grupa: Zarejestrowani
Postów: 156
Pomógł: 1
Dołączył: 25.09.2007

Ostrzeżenie: (0%)
-----


Witam
Mam sobie taki formularz:
  1. <form id="newsletter" method="post" action="sprawdz.php">
  2. <legend>Newsletter</legend>
  3. <input class="text" type="text" name="email" value="Twój e-mail..." onblur="if(this.value=='')this.value='Twój e-mail...'" onfocus="if(this.value=='Twój e-mail...')this.value=''">
  4. <button class="submit red" type="submit" name="">Zapisz</button>
  5. </form>

i kod php:
  1. <?php
  2. if (validate_email($_POST['email'])) {
  3.    echo 'Adres poprawny';
  4. } else {
  5.    echo 'Wpisz prawidłowo adres e-mail.';
  6. }
  7.  
  8. function validate_email($email) {
  9.    return (ereg('^[-!#$%&'*+./0-9=?A-Z^_`a-z{|}]+'. '@'. '[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+.' . [-!#$%&'*+./0-9=?A-Z^_`a-z{|}~]+ , $email));
  10. }
  11. ?>

I chciałbym, aby te informacje z 'echo' były wyświetlane za pomocą
http://sandbox.leigeber.com/dialog/dialog_box.html
tych dialog box-ow. Jednak tam w przykładzie trzeba kliknąć na link, a jak wywołać taką funkcję po kliknięciu w button ?

Ten post edytował max_mcee 20.06.2009, 17:29:18
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 15:18