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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:21:37+00:00 2026-06-18T09:21:37+00:00

Hi How to name and destroy instance of the object? Please see my working

  • 0

Hi How to name and destroy instance of the object?
Please see my working in jsfiddle

declare("obj_Button", [_WidgetBase], {
        buildRendering: function () {
            // create the DOM for this widget
            this.domNode = domConstruct.create("button", {
                innerHTML: "New Button Instance"
            });
        }
    });

    on(dom.byId('btn1'), "click", function(evt)
    {
        (new obj_Button()).placeAt(dom.byId('id'));
         //name the instance
    });

    parser.parse(); // check out more!

    on(dom.byId('btn2'), "click", function(evt)
    {
    // destroy the instance by name, not object
    });

Please advise. 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-06-18T09:21:38+00:00Added an answer on June 18, 2026 at 9:21 am

    If you know the ID of the widget, you can use “dijit/registry” to get the widget, then destroy it:

    require(["dijit/registry"], function(registry) {
       registry.byId("myWidgetId").destroyRecursive();
    });
    

    If you only know the ID of the dom node, you can registry.findWidgets() (if the widget is a child of the dom node) or registry.getEnclosingWidget() (if the dom node is a child of the widget).

    See http://dojotoolkit.org/reference-guide/1.8/dijit/registry.html#finding-all-widgets-underneath-a-dom-node

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

Sidebar

Related Questions

string name = bob; object obj = name; obj = joe; Console.WriteLine(name); I'm a
var name = 'Mike'; var person = { name: 'John', welcome: function(){ var name
when I do rails g model user name:string rails g controller users index create
How do I destroy instance variable after completing one ajax call. In my app
I'm trying to create an instance variable inside the create method of one controller
I have tried to destroy tags from the given code but it's not working.
session_start(); $_SESSION['user'] = 789456; $_SESSION['name'] = dummy; $_SESSION['id'] = 123; print_r($_SESSION); session_destroy(); echo Session
Name: <%= Html.TextBox(txtName, 20, new { @class = hello }) %> I want that
name_iexact keyword is a parameter we can pass to filter function in django.model. Can
id name mydate 1 co 2011-02-10 07:25:02 2 Carl 2011-02-10 07:26:02 . . .

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.