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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:07:39+00:00 2026-05-27T08:07:39+00:00

If you open a dialog when a dialog is already displayed then, by default,

  • 0

If you open a dialog when a dialog is already displayed then, by default, the second dialog will not expand past the width of the first dialog. This is true even though the second dialog is not actually enclosed within the first dialog (I get the second dialog by clicking a link in the first dialog).

I can set an explicit width on the second dialog, but this isn’t ideal. I really want it to auto-size to its contents (the quasipartikel multiselect), which are wider than the first/background dialog. With an explicit width on the second dialog I generally get two sets of scroll bars: one on the dialog itself, and on on the inner multiselect.

Note that I’ve only tried sizing the second dialog using an explicit width in the JS .dialog() call, and not via css (which I know almost nothing about).

Does anyone have any idea how to auto-size the second dialog? Thanks.

EDIT

Some code added as suggested:

<div id="dialog-top" title="Tab data">
  <form>
    ...lots of stuff, including id 'addCodeButton', which
    ...pops up the second dialog
  </form>
</div> <!-- dialog-top -->

<div id="dialog-add-code" title="Code selector">
  <select id = "codes" ...etc... > 
    ...
  </select>
</div>

$(function(){
   $('#addCodeButton').click(function(){
      // problem: this 'open' will not set the width of the new dialog
      // wider than 'dialog-top' unless an explicit width is given
      // (see '460' below)
      $('#dialog-add-code').dialog('open');
      return false;
    });
});

var $dialog = $("#dialog-top").dialog({
  autoOpen: false,
  modal: true,
  buttons: {
    ...
  }
});

$('#dialog-add-code').dialog({
  autoOpen: false,
  width: 460,
  modal: false,
  buttons: {
    ...
  }
});
  • 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-27T08:07:39+00:00Added an answer on May 27, 2026 at 8:07 am

    I’m not sure what’s causing your problem. Here’s fiddle demonstrating that what you want does work.

    http://jsfiddle.net/brettzink/NASyR/

    you tried .dialog({width:"auto"}); ?

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

Sidebar

Related Questions

I have a open file dialog with three filters: QString fileName = QFileDialog::getOpenFileName( this,
This is my first question on StackOverflow and I've already visited every single question
dialog() is already initiated at this point with: $(#repshare_dialog).dialog({autoOpen: false}); Next I'm trying to
How can I put up a File Open dialog from some VBA running in
I want to show a open dialog for the user, where the user can
I'm using a file open dialog to chose image files for further editing. The
I want to add a file type extension to the Open Dialog of Excel
I am writing a java program that needs a file open dialog. The file
How does one preserve the settings in the Open Dialog box? For example, I
I would like to to create a 2-step file uploader: Open dialog. Select one

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.