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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:35:54+00:00 2026-05-26T12:35:54+00:00

Given a dojo input widget (any form widget), what’s the best way to obtain

  • 0

Given a dojo input widget (any form widget), what’s the best way to obtain the widget’s form element? i.e. parent element.

i.e. I am looking to complete a function like this:

function getForm(widget) {

    return ( /**code goes here **/);
}

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-26T12:35:55+00:00Added an answer on May 26, 2026 at 12:35 pm

    Since form widgets can also be used outside forms, the only way I can think of is the same as you would do without widgets: get a starting dom node and move up until you get to a form node:

    function find_ancestor_of_type(ancestorTag, node){
        while(node && node.tagName !== ancestorTag){
            node = node.parentNode;
        }
    }
    
    function get_form(widget){
        return fund_ancestor_of_type("form", widget.domNode);
    }
    

    (I havent tested this yet though)


    By the way, why do you need to do this? Most of the times you can put most of the logic in the form itself (it can also be a dijit.form.Form if you want) and the input widgets don’t need to know anything about it.

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

Sidebar

Related Questions

Given an inorder-traversal list, what's the best way to create a Binary Min/Max Heap?
I have a dijit validationtextbox widget: <input dojoAttachPoint=tbIPAddress type=text size=15 class=ipaddress dojoType=dijit.form.ValidationTextBox required=true regExp=^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$
Is there any way to connect mysql database with dojo web pages. Kindly give
From what I've seen, the formatter function in Dojo DataGrid is given the following
Given long long int x, y; , I want a function that can compare
I have a dijit.form.Select widget. It's tied to a data store, if that matters.
Given the following string: s = 'abcdefg*' How can I match it or any
Given this Python program: num = input(Enter a number: ) result = 1024 for
Given SQL Server 2008, I have written a simple find in string function as
Given a JSON respond to a form I need to parse through the JSON

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.