function bookWebinar(webinarId,tafUrl)
{
$.post("my_content/gtw/webinarProcess.php", {wid: webinarId,bookWebinar:1},
function(data)
{
var obj = jQuery.parseJSON(data);
if(obj.result=="failure")
{
//show the message in the div with a red background
$(".bookingResult").addClass("classroomExpertError");
$(".bookingResult").html(obj.Message);
$('.bookingResult').show('slow', function()
{
setTimeout(function(){$('.bookingResult').hide('slow');},3000);
});
}
else
{
//show the message in the div with a green background
$(".bookingResult").addClass("classroomExpertSuccess");
$(".bookingResult").html(obj.Message);
$('.bookingResult').show('slow', function()
{
setTimeout(
function(){
$('.bookingResult').hide('slow',
function()
{
//need to put the taf form in here
$.colorbox({href:"my_content/taf.php?tafUrl="+tafUrl,
onClosed: function (message) {
window.location.replace("my_content/opening-offer.php");
}
});
});},3000);
});
}
});
return false;
}
Bookmarks