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

  • SEARCH
  • Home
  • 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 8952171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:49:01+00:00 2026-06-15T13:49:01+00:00

I am trying to display a password-reset form when certain flag is triggered. I

  • 0

I am trying to display a password-reset form when certain flag is triggered. I have the following basic code working to prompt the user to change their password, if there is no password_changed_flag. Depending on the response, the user receives a message back saying ‘Yes’ or ‘No’. Here is the code:

<?php if(!$password_changed_flag){
        <script type="text/javascript">     
        $('#ajaxShield').show();        
        var pw = <?php echo json_encode($this->session->userdata('password')) ?>;
        $.prompt("Your auto-assigned password must be changed.", pw,
        function(){
            $.msg("Yes.",{header:'Yes', live:10000});
            $('#ajaxShield').hide();
        },
        function(){
            $.msg("No.",{header:'No', live:10000});
            $('#ajaxShield').hide();
        });                 
        </script>
<?php } ?>

My only problem is that instead of using $.prompt and $.msg, what I really need to be doing is to display a form. This is the code the I have elsewhere which launches the form:

<a href="#ChangePW" return false; class="login-window" >Change Password</a>

I guess my problem is that I can view the form with the click of a hyperlink, but instead of viewing the form using a hyperlink, I need to be able to view the form when there is no password_changed_flag, as in the above code. So, it looks like I need to simulate the lower code block inside the upper code bock, somehow.

How can I simulate what happens in response to the hyperlink, without relying on a hyperlink?

Any ideas? Thanks.

  • 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-06-15T13:49:02+00:00Added an answer on June 15, 2026 at 1:49 pm

    You can trigger the click with Jquery

    $('#triggerClick').trigger('click');
    
    <a href="#ChangePW" class="login-window" id='triggerClick'>Change Password</a>
    

    If your using fancybox which your markup suggests you can also use:

    $("#triggerClick").fancybox().trigger('click');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the following code I am trying to get the select box to display
I want to display a prompt to get a user's username and password. I
I am trying to make a password prompt, when user entered a wrong password,
trying to display data only after variables have been set. $(document).ready(function () { function
Im trying to display some files in a web page so the user can
I am trying to display my popover menu whenever the user clicks on a
i am trying to convert the following code to vb.net but online converters return
I'm trying to display user name on the next card after user logged in,
I am trying to display form elements inline built using the cakePHP Form helper.
I'm trying to check that the fields in the form below have been filled

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.