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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:27:02+00:00 2026-05-22T18:27:02+00:00

Does anyone out there know how to submit a form that contains a Dojo

  • 0

Does anyone out there know how to submit a form that contains a Dojo Rich Text Editor?

I’ve tried adding the “name” attribute to my element that is decorated with dojoType=”dijit.Editor”, however, I don’t see any of the HTML on my receiving process.

I’ve checked the documentation and I don’t see any clear example (other than connecting the on submit event of the form in question with another function that sets the data of a hidden input with the “value” of the Rich Text Editor”).

I would assume there has to be some “easier” way to do this?

  • 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-22T18:27:03+00:00Added an answer on May 22, 2026 at 6:27 pm

    Here im able to send the value to the server, and able to redisplay in the submitted value as intial display value for the Editor.

    <html>
    <head>
    <style type="text/css">
        @import "http://ajax.googleapis.com/ajax/libs/dojo/1.5/dijit/themes/claro/claro.css";   
    </style>        
    <script src="djlib/dojo/dojo.js" type="text/javascript" djConfig="parseOnLoad:true"></script>   
     <link rel="stylesheet" href="djlib/dojox/grid/resources/Grid.css" type="text/css" />
    <body class="claro">
        <?php if(count($_POST) > 0) {
                echo '<script>function dumpSubmittedEditorValue(){}</script>';
                echo "<script>var submittedEditorValue = '$_POST[ed1]'</script> ";
            } 
        ?>
        <form jsId="frm1" dojoType="dijit.form.Form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
            <input type="hidden" name="ed1" />
            <span dojoType="dijit.form.Button">
                Submit
                <script type="dojo/method" event="onClick">
                    frm1.submit();
                </script>
            </span>
        </form>
        <div  dojoType="dijit.Editor" id="editor1">         
            <script type="dojo/method">
                this.hiddenField = dojo.query("[name=ed1]")[0];
                //console.log(this.hiddenField);
                /*dojo.connect(this.document.body,'onload',function(){                  
                    console.log("A");
                    console.log(this.document.body);
                })*/
            </script>
            <script type="dojo/method" event="onChange" args="val">
                //1st format. <p>     hi - should be - <p>HI
                var str = dojo.string.trim(val);
    
                var tagsEncoded = dojox.html.entities.encode(str, encodecustomMap);
                var whiteSpaceEncoded= tagsEncoded.replace(/\s/ig,"%20");
                this.hiddenField.value = whiteSpaceEncoded;
                console.log(this.hiddenField.value)
                //console.log(dojox.html.entities.decode(whiteSpaceEncoded.replace(/%20/ig," "), decodecustomMap))
    
    
            </script>
    
    
        </div>
        <script>
            var decodecustomMap = [                 
                    ["\u003C", "lt"],
                    ["\u003E", "gt"],
                    ["\u0026", "amp"]
                ];
                var encodecustomMap =  [
                    ["\u003C", "lt"],
                    ["\u003E", "gt"]
                ];
        </script>
    </body>
    
    <script>      
        dojo.require("dijit.Editor");
        dojo.require("dojox.html.entities");
        dojo.require("dijit.form.Form");
    
        dojo.addOnLoad(function(){
            console.log(dojo.query("iframe", dijit.byId("editor1").domNode))
            dojo.connect(dojo.query("iframe", dijit.byId("editor1").domNode)[0],'onload',function(){
                console.log(this.contentDocument.body)
                this.contentDocument.body.innerHTML = getEditorIntialValue();
            })
            function getEditorIntialValue(){
                if(typeof submittedEditorValue != "undefined"){
                    submittedEditorValue = dojox.html.entities.decode(submittedEditorValue,decodecustomMap);
                    submittedEditorValue  = submittedEditorValue.replace(/%20/ig,"&nbsp;");
                    return submittedEditorValue;
                    //dijit.byId("editor1").document.body.innerHTML = submittedEditorValue;
                }
                else{
                    return "";
                }
            }
    
        })
    </script>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know if there is a framework out there that is able to
Does anyone out there know about examples and the theory behind parsers that will
Does anyone know of an application or system out there for tracking changes (files
Does anyone out there know if it is possible to use sharding with a
Does anyone out there know if its possible to show a working version of
Does anyone out there know of any combination social media/portal platforms with a multi-vendor
Does anyone out there know how I can view what's actually being copied from
Does anyone out there know what image format results in the fastest loading speeds?
This is a bit of a crazy question, but does anyone out there know
Does anyone know of a jQuery plugin that can check if text is base64

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.