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

  • Home
  • SEARCH
  • 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 6129809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:47:08+00:00 2026-05-23T16:47:08+00:00

So My first though was, that adding more, and more HTML elements is not

  • 0

So My first though was, that adding more, and more HTML elements is not a way to go, and I come up with this solution

    var Jaxi = {
        CurrentLocation: '/',
        showLoginDialog: function () {
        dojo.place('<div data-dojo-type="dijit.Dialog" style="width:600px;" id="loginDialog"><div id="dialog-content"></div><a href="javascript:Jaxi.CloseDialog()">Close</div>', dojo.body())
            dojo.xhrGet({
                url: "/Account/SingIn?ReturnUrl=" + Jaxi.CurrentLocation,
                load: function (result) {
                    dojo.byId("dialog-content").innerHTML = result;
                }
            });
            dojo.ready(function () {
                dijit.byId("loginDialog").show();
            });
        },
        CloseDialog: function () {
            dijit.byId("loginDialog").hide();
            dojo.destroy("loginDialog");
        }
    };

It’s working.. To some degree at least. Dialog open, but no styles are appiled. But moreover I can’t close dialog.
Question Is how to make it working ?

  • 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-23T16:47:09+00:00Added an answer on May 23, 2026 at 4:47 pm

    After you have placed the div in your body, Dojo needs to parse the HTML to “notice” the new widget. When it notices the data-dojo-type attribute it says “Hey, here’s a widget, I need to make this into a beautiful Dialog”.

    showLoginDialog: function () {
        dojo.place('<div data-dojo-type="dijit.Dialog" ....</div>', dojo.body());
        dojo.parser.parse();
        ....
    

    Of course, you also have to make sure your body tag has class="claro" (or any other theme you want to use).

    That being said, I personally think this is a little messy way to make a dialog box. You are sort of mixing declarative with programmatic. I’m not sure what you mean by “My first though was, that adding more, and more HTML elements is not a way to go“, but in my own opinion mixing HTML inside your javascript makes the code difficult to read. You may want to take a look at this sitepen article if you want a clean way to separate HTML and Javascript.

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

Sidebar

Related Questions

And I'm not meaning Bits Per Minute, but Business Process Management. At first though
This is my first time on StackOverflow though I read Coding Horror quite often.
I'm finishing up some of my first C# classes and even though the original
I'm confused. I'm trying to loop though 2 files looking at the first token
Okay at first I thought this would be pretty straightforward. But I can't think
NOTE: THE PROBLEM IS NOT IN THIS CODE, BUT THE ANSWER FOR EXC_BAD_ACCESS is
I was adding zero-or-more and one-or-more modifiers to my PEG parser, which is straightforward
First of all, let me just say that I'm using the PHP framework Yii,
here's the main code at first I thought is was the message box but
does the following integer arithmetic property hold? (m/n)/l == m/(n*l) At first I thought

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.