0

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;
});
});
2
Contributors
2
Replies
13
Views
3 Years
Discussion Span
Last Post by Bile
0

-->Hi chrisschristou, I came accross your post but I'm sorry that I cant help with the 'problem'...
The only thing I've find with this post is that I am in a situation of needing something that You already have the 'Pop Window' for log in, If You will help Me set My page like that having a link where users click and a pop window for log in appears I will appreciate that...
Thanks in advance.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.