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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:42:54+00:00 2026-05-24T06:42:54+00:00

I have an issue with a dialog I’m trying to create in JQuery. It

  • 0

I have an issue with a dialog I’m trying to create in JQuery. It should open when a button is pressed. I’ve tried several different methods of creating it, and it always is created with “display:none” in the element style.

When I click the button, the page darkens (the ‘modal’ part), but the dialog doesn’t show up. If I use firebug to remove the display:none attribute, the dialog appears correctly.

I have created several dialogs before with no problems and I’m thinking this must be an issue with the particular site I’m trying to create the dialog in. It’s within a CMS that has a lot going on. I’ve tried commenting out the other scripts that are included and that didn’t help.

Any ideas as to what might be causing this problem? Is there something on the site that would cause new elements to appear invisible? Or something that would cause jquery to add this attribute?

I have tried:

1) Creating the div at page load, creating the dialog with autoOpen:false, and setting the button click event to call the dialog open.

2) Creating the dialog when the button is clicked (i.e. (“text).dialog(…)

3) Setting display to inline after the dialog open event in either case

Here is an implementation of (1) above:

$(document).ready(function() {

$('body').append('<div id="win_dialog">test</div>');

$('#win_dialog').dialog({
    modal: true,
    autoOpen: false,
    show: "fade",
    hide: "fade",
    width: "auto",
    height: "auto",
    close: function(event, ui) {
        $("#win_dialog").remove();
    },
    buttons: {
        "Enter": function () {alert('works');},
        "Cancel": function () { $(this).dialog("close");}
    }
});

$('#enter_win_btn').click(function() {
    $("#win_dialog").dialog('open');
});
});

Thank you!!

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

    Thanks to AlienWebguy’s request for version numbers, I realized that I was using jquery-ui 1.8.4 with a css for version 1.8.10. I updated the script tag for jquery-ui to 1.8.10 and now everything seems to work.

    Thanks everyone for the help! What a great resource this website is.

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

Sidebar

Related Questions

I have a issue with a Jquery DatePicker popup dialog being clipped by an
I think this is an !important issue. I have a dialog with a set
So I currently have a jQuery dialog with two buttons: Save and Close. I
Well, I have a form that pops up in a modal dialog when a
I Have a java program that does sort of this: It starts off with
Possible Duplicate: Is there a way to have content from an IFRAME overflow onto
I have a fairly old unmanaged C++ program that called managed c# code (vs2003)
Surprisingly one can show more than one dialog at a time by putting the
When the users presses the back button in my application. Here is the scenario:
I've recently been working on a vCard parser that opens a vCard file and

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.