[ Обновленные темы · Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Форум » Web-разработка » Скрипты » Отправка E-mail (Отправка E-mail)
Отправка E-mail
aaaaДата: Четверг, 27.05.2010, 23:01 | Сообщение # 1
Admin
Группа: Администраторы
Сообщений: 48
Награды: 0
Статус: Offline
SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function getCookie(name){
var cname = name + "=";
var dc = document.cookie;
if (dc.length > 0) {
begin = dc.indexOf(cname);
if (begin != -1) {
begin += cname.length;
end = dc.indexOf(";", begin);
if (end == -1) end = dc.length;
return unescape(dc.substring(begin, end));
}
}
var blank = "";
return blank;
}
function setCookie(name, value, expires) {
document.cookie = name + "=" + escape(value) +
((expires != null) ? "; expires=" + expires.toGMTString() : "")
+ "; path=/";
}
function setName() {
var expdate = new Date ();
expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000 * 365));
var prompt=i = document.Mail.name.value;
setCookie("name", i, expdate);
}
function getName() {
if(getCookie("name") != null) {
document.Mail.Name.value = getCookie("emailname");
}
}
function getInfo() {
var now= new Date();
document.Mail.Info.value = "Browser: " + navigator.userAgent;
document.Mail.Info.value += "Date:" + now;
}
function checkMultiple() {
if (getCookie("emailsent") == 'true') return true;
else return false;
}
function process() {
setCookie("emailsent", "true");
with (document.Mail) {
if (Subject.selectedIndex == 1) action = "mailto:eugenezz@yandex.ru?subject=JS Library - Комментарий";
else if (Subject.selectedIndex == 2) action = "mailto:eugenezz@yandex.ru?subject=JS Library - Вопрос";
else if (Subject.selectedIndex == 3) action = "mailto:eugenezz@yandex.ru?subject=JS Library - Предложение";
else if (Subject.selectedIndex == 4) action = "mailto:eugenezz@yandex.ru?subject=JS Library - Неработающие ссылки";
else action = "mailto:eugenezz@yandex.ru?subject=JS Library - Разное";
}
}
function formCheck() {
var passed = false;
with (document.Mail) {
if (Subject.selectedIndex == 0) {
alert("Пожалуйста, заполните поле \"Тема\".");
Subject.focus();
}
else if (Name.value == "") {
alert("Пожалуйста, заполните поле \"Ваше имя\".");
Name.focus();
}
else if (checkMultiple()) {
if (confirm("Вы только что отправили письмо из этой формы. Вы уверены, что хотите отправить еще одно?")) {
process();
passed = true;
}
}
else {
process();
passed = true;
}
}
return passed;
}
// End -->
</SCRIPT>
 
Разместить в своём:




Нравится



aaaaДата: Четверг, 27.05.2010, 23:04 | Сообщение # 2
Admin
Группа: Администраторы
Сообщений: 48
Награды: 0
Статус: Offline
Отправка E-mail по списку

Содержимое этой таблицы поместите между и

onSubmit="(document.mailer.action += mailtoandsubject)">






























Получатель:
Ваше имя:
Ваш Email:
Важность:
Тема:
Сообщение:


 
Разместить в своём:




Нравится



Форум » Web-разработка » Скрипты » Отправка E-mail (Отправка E-mail)
  • Страница 1 из 1
  • 1
Поиск: