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 8152465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:43:24+00:00 2026-06-06T15:43:24+00:00

It might be a stupid problem, but I am very new to jQuery. I

  • 0

It might be a stupid problem, but I am very new to jQuery. I am trying to create a button that on-click will pop-up a login dialog. Somehow the form is shown instead of being created as a dialog. Below is my code:

<head>
    <script src="js/jquery-ui-1.8.21.custom.min.js"></script>
    <script>
        $(function() {   
            $('#login').dialog({
                    autoOpen: false,
                    title: 'Login',
                    height: 300,
                    width: 350,
                    modal: true
            });

            $('#open').click(function() {
                $('#login_form').dialog('open');
                return false;
            });
        });
    </script>        
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <div id="login">
        <form class="caption" action="Login.php" method="post">           

        <p>E-mail: <br><input type="text" name="email" maxlength="255" /></p>
        <p>Password:</p> <br><input type="password" name="pwd" /></p>
        <p><input type="submit" value="Login" /></p>

        </form>

    </div>
    <button id="open">Click</button>
</body>

Any idea what I have done wrong? Thank you very much!

  • 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-06T15:43:26+00:00Added an answer on June 6, 2026 at 3:43 pm

    Alex W had it above:

    From https://developers.google.com/speed/libraries/devguide#jqueryUI

    note: This library depends on jquery. You must also load jquery before
    loading this module.

    In addition, you’re trying to open the #login_form element, rather than the #login element. You need to use the same jQuery set. See the modified code below.

    <head>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
        <script>
            $(function() {   
                $('#login').dialog({
                        autoOpen: false,
                        title: 'Login',
                        height: 300,
                        width: 350,
                        modal: true
                });
    
                $('#open').click(function() {
                    $('#login').dialog('open');
                    return false;
                });
            });
        </script>        
        <meta charset="utf-8" />
        <title></title>
    </head>
    <body>
        <div id="login">
            <form class="caption" action="Login.php" method="post">           
    
            <p>E-mail: <br><input type="text" name="email" maxlength="255" /></p>
            <p>Password:</p> <br><input type="password" name="pwd" /></p>
            <p><input type="submit" value="Login" /></p>
    
            </form>
    
        </div>
        <button id="open">Click</button>
    </body>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I might be stupid and you need to excuse me in that case...but I
might be a stupid question but I seem to be confused. Im pretty new
This might be a stupid question but I'm new at all this. I want
I'm with an irritating problem. It might be something stupid, but I couldn't find
This might sound like a stupid problem but I wondered for a long time
I'm very new to web development and I know this might be stupid approach
This might be a stupid question, but I have a little problem with understanding
I'm pretty new still at C# so I might be doing something stupid, but
There might be a stupid simple answer to this, but I'm trying to use
this might question might sounds stupid, but I could'nt figure it out. How can

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.