Revision: 43192
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 18, 2011 18:36 by erraja_07
Initial Code
/*** Send Colleague Inivtation - STARTS ***/
function colleagueInvitation(form_obj)
{
var message = $("#message_box_colleague").val();
// first hide any error messages
$('.error').hide();
$('.common_error').html('');
var selected_items = $("#colleague_selected_email_container div").size()
// Form Validations
if(selected_items==0)
{
$(".common_error").html('Select atleast one Colleague');
$("#selected_emails:tr first").focus();
}
else if(message == "") {
$("label#message_box_colleague_error").show();
$("label#message_box_colleague_error").html('This field is Required');
$("#message_box_colleague").focus();
return false;
}
else
{
var str = $("#"+form_obj.id).serialize();
$("#tab4_sub_div2").hide();
$("#temp_loader").show();
$.ajax
({
type: "POST",
url: "community/send_invitation.php",
data: str,
success: function(msg)
{
$("#temp_loader").hide();
$("#tab4_div").show();
$("#tab4_webmail_notice").css('display','block');
$("#tab4_webmail_notice").html(msg);
$("#tab4_webmail_notice").fadeIn('slow')
.animate({opacity: 1.0}, 3000)
.fadeOut('slow', function() {
$("#tab4_webmail_notice").slideUp();
});
}
});
}
}
/* ----- ENDS ----- */
/* ----- HTML PART ----- */
<br clear="all"/><p><label class="error" for="attach_link_url" id="attach_link_url_error" style="display:none; color:red; font-weight:normal;"></label></p>
Initial URL
Initial Description
Initial Title
JQuery AJAX with Validation - Scripts
Initial Tags
Initial Language
JavaScript