Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6570135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:43:05+00:00 2026-05-25T14:43:05+00:00

I implemented a nice popup modal login dialog for my main page. When I

  • 0

I implemented a nice popup modal login dialog for my main page. When I click on the link I am using:

$(document).ready(function() {
        $('#loginButton').click(function(e) {
            $.ajax({
                url: "@{Secure.login()}",
                success: function(data) {
                    $("#myModal").html(data + '<a class="close-reveal-modal">&#215;</a>');
                    $('#myModal').reveal();
                }
            });
        });
    });

My application is designed that some controllers need authentication from the user and is redirected before to the login view.

What I want to do is that if the user is accessing a secure controller he needs to see the login popup screen instead of beeing redirected to the view so that I have the same user experience.

I already got a suggestion from google groups:

a) It would be nicest to intercept all secure links already on the
client side with some JavaScript and show your modal dialog. This is
independent from what the secure module provides.

But dont know how to implement this or if there is already a solution for this out there.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:43:06+00:00Added an answer on May 25, 2026 at 2:43 pm

    Your question is really from jQuery category, not ajax or playframework or web-security. In case all your secure links start with https://

        $('a[href^="https://"]').click(// function here);
    

    in case your links are marked with .secure class:

        $('a.secure').click(// function here);
    

    the function will show popup modal login dialog, return false and redirect user to the original link url in the end of success callback.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just wondering if there was a nice (already implemented/documented) algorithm to do the following
Hai Thanks for everything. I have successfully implemented clean URL in local. Very nice
I managed to get FIT up and running using fixtures implemented in C#. I
This is my situation. I have successfully implemented logging to remote syslog using log4net.
I have implemented the CustomRadioButton from this Link . Here, theme is implemented for
I have implemented a small command line interface using JewelCLI and it creates an
I have implemented an error style for textboxes using the following code. This sets
I have implemented the jQuery buttonset of radio buttons using this HTML: <div id=buttons>
I implemented a RNS Montgomery exponentiation in Cuda. Everything nice everything fine. It runs
i have downloaded one nice sample code UAModalPanel . i have implemented it in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.