I have some jQuery and AJAX code that performs an action. If a user id is not passed in, and there isn’t one in the session, I want to make a dialog box for the user to ask them to register or log in.
Is there a way to do that in jQuery?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes! Use jQuery UI. Specifically, see their dialog section. I’m presuming you know how to add a function on ajax success with jquery’s ajax methods (where you’ll need to tell the dialog to display), let me know if that is not the case and you need help with these.