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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:12:19+00:00 2026-05-12T06:12:19+00:00

I tried making a dialog using jquery it works but I have no succes

  • 0

I tried making a dialog using jquery it works but I have no succes at doing it onclick bacuse it should not just popup but only when you click on it.

<script type="text/javascript"> 
$.ui.dialog.defaults.bgiframe = true;
$(function() {
    $("#dialog").dialog();
});
</script>  

and

<div id="dialog" title="Basic dialog">
    <p>hi how are you</p>
</div>

and for the nice looking button

<button id="create-user" class="ui-button ui-state-default ui-corner-all">Profiel Matthijs</button>

tried using these examples

http://jqueryui.com/demos/dialog/
http://jqueryui.com/demos/dialog/#modal-form

anyone know how to get this working with an click on the #create-user button
i am not so good at javascript.

Thanks
Matthy

  • 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-12T06:12:20+00:00Added an answer on May 12, 2026 at 6:12 am

    You need to set the autoOpen option to false so that the dialog will not open when its created.

    To open it when your button is clicked, you would call the open method.

    <script type="text/javascript"> 
        $.ui.dialog.defaults.bgiframe = true;
        $(function() {
            $('#dialog').dialog({
                autoOpen: false
            });
            $('#create-user').click(function() {
                $('#dialog').dialog('open');
            });
        });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried making every div 75px and the table within the div but
I have tried making a fiddle for this, but it's been too difficult to
I'm making a simple dialog in XCode 4 using the Interface Builder. I have
Using J2SE, I tried making a LAN application using java.net.*, and it worked perfectly.
I am making a GUI in OpenGL (more specifically lwjgl). I have tried hard
I'm having trouble making python print out texts properly aligned. I have tried everything
I have tried making a switch like statement in python, instead of having a
I'm making a jQuery UI dialog around an iframe element and the performance of
I tried making a reset button to delete everything but when you refresh page
I tried making an extension to the built-in String class using C++/CLI, and using

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.