This repository has been archived by the owner on Jan 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
54 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,54 @@ | ||
function valid_datas( f ){ | ||
|
||
if( f.name.value == '' ){ | ||
jQuery('#form_status').html('<span class="wrong">Your name must not be empty!</span>'); | ||
notice( f.name ); | ||
}else if( f.email.value == '' ){ | ||
jQuery('#form_status').html('<span class="wrong">Your email must not be empty and correct format!</span>'); | ||
notice( f.email ); | ||
//}else if( f.phone.value == '' ){ | ||
//jQuery('#form_status').html('<span class="wrong">Your phone must not be empty and correct format!</span>'); | ||
//notice( f.phone ); | ||
}else if( f.subject.value == '' ){ | ||
jQuery('#form_status').html('<span class="wrong">Your subject must not be empty!</span>'); | ||
notice( f.subject ); | ||
}else if( f.message.value == '' ){ | ||
jQuery('#form_status').html('<span class="wrong">Your message must not be empty!</span>'); | ||
notice( f.message ); | ||
}else{ | ||
jQuery.ajax({ | ||
url: 'mail.php', | ||
type: 'post', | ||
data: jQuery('form#fruitkha-contact').serialize(), | ||
complete: function(data) { | ||
jQuery('#form_status').html(data.responseText); | ||
jQuery('#fruitkha-contact').find('input,textarea').attr({value:''}); | ||
jQuery('#fruitkha-contact').css({opacity:1}); | ||
jQuery('#fruitkha-contact').remove(); | ||
} | ||
}); | ||
jQuery('#form_status').html('<span class="loading">Sending your message...</span>'); | ||
jQuery('#fruitkha-contact').animate({opacity:0.3}); | ||
jQuery('#fruitkha-contact').find('input,textarea,button').css('border','none').attr({'disabled':''}); | ||
} | ||
|
||
return false; | ||
function valid_datas(f) { | ||
if (f.name.value == '') { | ||
jQuery('#form_status').html( | ||
'<span class="wrong">Your name must not be empty!</span>' | ||
); | ||
notice(f.name); | ||
} else if (f.email.value == '') { | ||
jQuery('#form_status').html( | ||
'<span class="wrong">Your email must not be empty and correct format!</span>' | ||
); | ||
notice(f.email); | ||
//}else if( f.phone.value == '' ){ | ||
//jQuery('#form_status').html('<span class="wrong">Your phone must not be empty and correct format!</span>'); | ||
//notice( f.phone ); | ||
} else if (f.subject.value == '') { | ||
jQuery('#form_status').html( | ||
'<span class="wrong">Your subject must not be empty!</span>' | ||
); | ||
notice(f.subject); | ||
} else if (f.message.value == '') { | ||
jQuery('#form_status').html( | ||
'<span class="wrong">Your message must not be empty!</span>' | ||
); | ||
notice(f.message); | ||
} else { | ||
jQuery.ajax({ | ||
url: 'mail.php', | ||
type: 'post', | ||
data: jQuery('form#dow-contact').serialize(), | ||
complete: function (data) { | ||
jQuery('#form_status').html(data.responseText); | ||
jQuery('#dow-contact').find('input,textarea').attr({ value: '' }); | ||
jQuery('#dow-contact').css({ opacity: 1 }); | ||
jQuery('#dow-contact').remove(); | ||
}, | ||
}); | ||
jQuery('#form_status').html( | ||
'<span class="loading">Sending your message...</span>' | ||
); | ||
jQuery('#dow-contact').animate({ opacity: 0.3 }); | ||
jQuery('#dow-contact') | ||
.find('input,textarea,button') | ||
.css('border', 'none') | ||
.attr({ disabled: '' }); | ||
} | ||
|
||
return false; | ||
} | ||
|
||
function notice( f ){ | ||
jQuery('#fruitkha-contact').find('input,textarea').css('border','none'); | ||
f.style.border = '1px solid red'; | ||
f.focus(); | ||
} | ||
function notice(f) { | ||
jQuery('#dow-contact').find('input,textarea').css('border', 'none'); | ||
f.style.border = '1px solid red'; | ||
f.focus(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ | |
$body = ob_get_contents(); | ||
ob_end_clean(); | ||
|
||
$to = '[email protected]'; | ||
$to = '[email protected]'; | ||
|
||
$s = mail($to, $subject, $body, $headers, "-t -i -f $from"); | ||
|
||
|