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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:18:51+00:00 2026-05-28T06:18:51+00:00

I have a from in dialog. Everything works percectly, but how can I refresh

  • 0

I have a from in dialog. Everything works percectly, but how can I refresh the values in inputs after save data in db?

Is there a trick to refresh whole form or should I use dialog.reset() when someone hides dialog by pressing Cancel button? If it could be done only by reset() method, so how can I handle event when escape is pressed and the closing-cross (in the top-right corner)

Best regards

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

    Usually, if a user closes a dialog, I just destroy the thing and create a new one.

    You can use something like this to capture when the user has closed the dialog, and clean it up:

    myDialog.connect(myDialog, 'close', function(){myDialog.destroy();});
    

    Note that the fact that you use the connect() method on the dialog widget means that the connect itself will also be cleaned up when the widget is destroyed.

    Nice and neat 🙂

    If you are just looking to clear the form, you can use document.myform.reset() in the close connect.

    A more complete example:

    showDia: function(){
        myDia = new dijit.Dialog({
            title: "Public Reminder",
            content: "<center>My incredible dialog content that will change the world</center><br>"+
                "<form id='fooBarForm'>"+
                "<input type='hidden' name='fooName' id='fooId' value='fooValue'></input>"+
                "<select name='barName' style='margin: 3px;' id='barId'>"+
                "<option value='barOpt1'>test1</option>"+
                "<option value='barOpt2'>test2</option>"+ 
                "</select>"+
                "</form>",
            style: "width: 320px;"
        });
        myDia.connect(myDia, 'close', function(){myDia.destroy();});
        // OR you can call `reset()` on the fooBarForm instead of `myDia.destroy()`, and when 
        // you call `showDia()`, check if the dialog already exists and then just call `show()` on 
        // it
        myDia.show();
    }
    

    Now, one thing about this is that is does introduce a global name (myDia). But you can easily make that a member of an object and that won’t be the case. showDia should also be a member method on an object (ie, not a global function).

    Also, this is often done by using a content pane to pull in the content from a URL.

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

Sidebar

Related Questions

So i have to show a jquery UI Dialog from codebehind. I've tried everything:
I have a form and from this I call dialogPrintDiet.ShowDialog() which launchs my dialog.
I have a from where you can fill in any combination of your home,
I have data from *.obj file. I know how draw with GL_TRIANGLES . How
I have an activity that gets some data from the internet in background while
I am using the TinyMCD plugin in the Dialog plugin. Everything works fine, until
I have (from the sed website http://sed.sourceforge.net/sed1line.txt ) this one-liner: sed -e '/./{H;$!d;}' -e
Here's the code I have: from cStringIO import StringIO from lxml import etree xml
I have derived from a 3rd party class, and when I attempt to call
i have heard from a friend of mine that the best algorithm for swapping

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.