hello friends.
i have a small proble but i'm not abble to solve, the problem is i have i form when user submit if he is not login he get a alert please login
function showloginbox()
{
var client=document.forms["formulaireajout"]["client"].val;
if (client==null || client=="")
{
alert ("please login");
return false;
}
}
and i have a login popup plugin who work fine if user click on this link <a href="#login-box" class="login-window">Login / Sign In</a>
it appear and user can login.
i want to mix the both code if user is lot login and he try to login then the popup window appear.help please
help please, here is the popup code
$(document).ready(function() {
$('a.login-window').click(function() {
//Getting the variable's value from a link
var loginBox = $(this).attr('href');
//Fade in the Popup
$(loginBox).fadeIn(300);
//Set the center alignment padding + border see css style
var popMargTop = ($(loginBox).height() + 24) / 2;
var popMargLeft = ($(loginBox).width() + 24) / 2;
$(loginBox).css({
'margin-top' : -popMargTop,
'margin-left' : -popMargLeft
});
// Add the mask to body
$('body').append('<div id="mask"></div>');
$('#mask').fadeIn(300);
return false;
});
// When clicking on the button close or the mask layer the popup closed
$('a.close, #mask').live('click', function() {
$('#mask , .login-popup').fadeOut(300 , function() {
$('#mask').remove();
});
return false;
});
});