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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:03:53+00:00 2026-05-26T15:03:53+00:00

I got a div tag which initially is set to have display:none and will

  • 0

I got a div tag which initially is set to have display:none and will later be convert into a dialog:

 @* To load the create dialog *@
  <div id="createdialog">
  </div>

I load a partial view into the dialog like this:

 // Dialog for create food
        var controllerUrl = '/Food/CreateFood';
        $('#createdialog').append($('#loading'));
        var $createdialog = $('#createdialog').load(controllerUrl).dialog({
            autoOpen: false,
            title: 'Create Food',
            modal: true,
            // To set the dialog width to full width
            width: 'auto',
            // Call the clear function without '()'
            close: clear
        });

And then i open it inside the jquery ui drop event once user drop something:

        $.validator.unobtrusive.parse($createdialog);
        $createdialog.dialog('open');

So it means that my dialog is actually created on demand, so I cant pre-load the dialog content. I need to display a loading image and hide it once everything is done loaded in the dialog. But I just cant get it work…Hope can get some help here….

Appreciate any feedback…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-05-26T15:03:54+00:00Added an answer on May 26, 2026 at 3:03 pm

    I somehow figure it out. I use the .load() callback instead. Just to show my way here:

     // Use the load callback to open dialog to ensure content is loaded
            $createdialog.load(controllerUrl, function () {
                $('#loading').hide();
                $createdialog.dialog('open');
            });
    

    Thanks!

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

Sidebar

Related Questions

I have an iFrame on a page set to display: none; <div id=the-stage style=display:none;>
I've currently got a div tag with several text rules set, p, h1, h2...
I'm trying to do something fairly simple. I've got a div tag in which
I got this div tag who's background image's being set in the CSS using
Hi I've got a DIV section that has only its title visible initially. What
I have got a div [projItemsContent] that varies in height based on the contents,the
I've got an empty DIV element in which I append images by using function
I've got a html page which loads another html page into one of its
Possible Duplicate: Get image data in Javascript? Hello, I've got a single div, which
I'm currently working on a new project. I've got a div which acts as

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.