You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
3.2 KiB
JavaScript
82 lines
3.2 KiB
JavaScript
// JavaScript Document
|
|
$(function(){
|
|
$('a[rel*=facebox]').facebox({opacity:0.5,outClose:false});
|
|
});
|
|
$(document).ready(function() {
|
|
$('#mycarousel').jcarousel({
|
|
vertical: true,
|
|
scroll: 3
|
|
});
|
|
$("#su_select li").click(function (){
|
|
$("#su_select li").removeClass("select");
|
|
$(this).addClass("select");
|
|
$("#GreetingWords").val($.trim($(this).text()));
|
|
});
|
|
});
|
|
function checkForm(){
|
|
if(checkEamil($("#yemail").val()) && checkEamil($("#femail").val()) && $("#yname").val() && $("#fname").val()){
|
|
$.facebox("Please wait...");
|
|
}
|
|
else
|
|
{
|
|
$.facebox("The Email your input Invalid or forget input your/friend name!");return false;
|
|
}
|
|
}
|
|
function sendForm(){
|
|
var pfname='';
|
|
var pfemail='';
|
|
$('input[name="fname"]').each(function(index, element) {
|
|
pfname+=$(this).val();
|
|
if($('input[name="fname"]').length>1){pfname+=' , '}
|
|
});
|
|
$("#pfname").html(pfname);
|
|
$('input[name="femail"]').each(function(index, element) {
|
|
pfemail+=$(this).val();
|
|
if($('input[name="femail"]').length>1){pfemail+=' , '}
|
|
});
|
|
$("#pfemail").html(pfemail);
|
|
$.ajax({
|
|
type:"POST",
|
|
url: "/cards/post-email.asp",
|
|
data: $("#sendCardForm").serialize(),
|
|
beforeSend:checkForm,
|
|
success: function(msg){
|
|
$.ajax({
|
|
type:"Get",
|
|
url: "/cards/post-new.asp",
|
|
dataType: "html",
|
|
beforeSend:function(){$.facebox("Waiting.");},
|
|
success: function(msg1){
|
|
$.facebox("<div id=\"post-new \">"+ msg1 +"</div>");
|
|
$(".close").hide();
|
|
$("#P_N_FEmail_List").html($("#pfemail").html());
|
|
$("#P_N_FName_List").html($("#pfname").html());
|
|
tempurl = location.href.replace("/cards/card-preview.asp","/cards/card-select.asp");
|
|
$(".geturl").attr("href",tempurl);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
function checkEamil(o) {
|
|
if ( !( /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(o))) {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
}
|
|
function addFriend(){
|
|
var ortherF = $(".cardPoster .CFColumn").eq(1).clone();
|
|
var delBTN = $("<img src='/pic/close.png' style='margin: 5px;' onclick='delFreiend(this)'/>");
|
|
ortherF.append(delBTN).find("#fname,#femail").val("").end().appendTo("#moreCFC");
|
|
}
|
|
function delFreiend(Obj){
|
|
$(Obj).parent().remove();
|
|
}
|
|
function postcard(url){
|
|
var temp='';
|
|
temp+='<form method="post" name="postcard" action="/cards/postcards/" id="postcard">';
|
|
temp+='<input type="hidden" value="'+url+'" name="PicURL" /></form>';
|
|
$(temp).appendTo("body");
|
|
$("#postcard").submit()
|
|
} |