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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:45:16+00:00 2026-05-15T19:45:16+00:00

I’ve created a dialog in dojo with a few input fields. Based upon a

  • 0

I’ve created a dialog in dojo with a few input fields. Based upon a few criteria, I’d like to dynamically the destination url the data is posted to within that dialog (the equivalent of the action attribute on a form). Yet I see no way to set a dialog’s action, or even how to manually submit it.

Here is a bare-bones version of the dialog:

<div id="my_dialog" dojoType="dojo.dijit.Dialog" style="display:none;" title="My Dialog">
<input type="text" dojoType="dijit.form.TextBox" id="input_1" name="input_1" value="info" />
<button type="submit" dojoType="dijit.form.Button">Submit</button>
</div>
  • 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-15T19:45:17+00:00Added an answer on May 15, 2026 at 7:45 pm

    I figured it out and will share what I learned.

    If you put a form inside of the dialog, you can access it just like any other Dojo form. But you have to make sure that dialog is not already in another form. That was my problem, it caused the inner form to disappear when the dialog is moved to the end of the body tag.

    <div id="my_dialog" dojoType="dojo.dijit.Dialog" style="display:none;" title="My Dialog">
    <form id="my_form" dojotType="dijit.form.Form" method="post" action="/path/">
    <input type="text" dojoType="dijit.form.TextBox" id="input_1" name="input_1" value="info" />
    <button type="submit" dojoType="dijit.form.Button" onclick="return someFunction();">Submit</button>
    </form>
    </div>
    

    Using the structure above, you have a couple of options to get the form’s values: from the dialog, or from the form. That means dijit.byId(“my_dialog”).attr(“value”) is the same as dijit.byId(“my_form”).attr(“value”). That was what originally confused me and made me thing the dialog itself could act as a form.

    To process or validate the form before it is submitted, add onclick=”return someFunction();”, and make sure that function returns true only if the form should be submitted.

    One additional pitfall is that all inputs in the dialog are moved to the end of the dom. So if you did not have the form inside the dialog, and you expected those inputs in the dialog to be submitted with a parent form, that isn’t going to happen. In this case, I create hidden fields inside the parent form, then manually copy the dialog input values into them before submitting.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I am trying to render a haml file in a javascript response like so:
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I need to clean up various Word 'smart' characters in user input, including but

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.