1. Isaac says

    Thanks alot for your script. It has really help me. I however have a challenge passing a variable from php to the init.js file. This is just what i want to accomplish

    function go_to_private_page()
    window.location = ‘main.php?test=(a php variable HERE)’;

    Please help me out.


  2. lance says

    There is a problem with the downloadable demo.

    You can fix it by changing the line
    $_SESSION[‘username’] = $username;

    in do-login.php…. to

    $_SESSION[‘username’] = $post_email;

    the problem was that $username was not being set, so in private.php all users were redirected back to index.html

  3. Sergio Paiva says

    I have a problem. After login this is redirect to login.php that doesn’t exists. I saw in the code that is caused because this line in do-login.php:

    $_SESSION[‘username’] = $username;

    The variable $username has no value.

  4. jeff says

    Great, great login! After banging my head and searching for days, I can’t seem to figure out why the validation will not carry all the way through and therefore I am being redirected back to the login page. My backend programming is weak, but I have found that it may be an issue w/ the session or cookie….could someone please post the fix for this? Thank you!

  5. ryan says

    Hey I love this thing, but I’m having some issues with the declaration in MSIE. It seems that if I use a standard doctype, like just , the jquery modal script breaks. Is there some fix to the jquery function I can apply so I can use normal doctypes with this thing?

  6. ahmed says

    I really like the idea behind Modal window and i know how its useful.

    But all Modal Window and other similarity are triggered after CLICK event. I have to click on SPECIFIC ID to get Modal Window shows up.

    What i’m looking for to have simple Modal Window build by jQuery and it get triggered when user select any text from web page (plain text from P or SPAN tag). And when Modal Window open up it has some data or links or some tabs inside that Modal Window each tab has its own data such as forms or links, images, audio, video, ….etc

    I hope i’m clear and explained myself enough. Im still new to jQuery and searching a lot for such solution or close solution to my idea, but i cant.

    I’ll be so grateful of you can guide me or show how and where to start. Or is it really possible to that.

    Thanks a lot

  7. andy says

    Hi Gabriel,

    Great work!

    I have a small problem. When user clicks on X (close) image button – i wan’t the page to be redirected to home page. How can i set the close button to redirect to home page instead of just hiding the modal login box.


  8. Lauren says

    Will this work for a secure login? DO modals and pop ups defer from having a secure login? Is it worth it to redirect to a new sign in page rather than doing this method for security reasons?

  9. Pato de Borracha says

    I use:

    in top of code and not work Modal!
    if i change it for:

    Not Work my Page :(

    How i do?

  10. Alex says

    fine tutorial!
    it works great! if u check other tutorials, you can finde online, you go crazy! some of them are really bad und impossible to understand.

    but what about security issue? how secure is such a ajax/jquery login?

  11. says

    I would like to implement this on a site I’m building for a friend. They want to be able to log into a third party site that manages their inventory. They have dozens of user ids, so putting the login credentials in so-login.php won’t work. If this were a simple html form, I’d just set the action to the appropriate cgi login path and their server takes care of the login authorization. Is that possible with your login modal…to simply direct the action to third party log in?


Leave a Reply

Your email address will not be published. Required fields are marked *