[Dojo-interest] Problem nesting dijit.Editor inside dijit.form.Form
Ganesh
ganesh at j4fry.org
Sat Jul 25 04:28:22 EDT 2009
Ok, got a little bit deeper into this:
First creating the dijit.form.Form and then the nested dijit.Editor works, but
first creating the dijit.Editor and then transforming the surrounding form into
a dijit.form.Form fails.
This one works:
<form id="testme" >
<div id="myEditor">test</div>
</form>
<script type="text/javascript">
//<![CDATA[
dojo.require("dijit.form.Form");
dojo.require("dijit.Editor");
dojo.addOnLoad(function() {
new dijit.form.Form({}, dojo.byId("testme"));
new dijit.Editor({}, dojo.byId("myEditor"));
});
//]]>
</script>
and this one doesn't:
<form id="testme" >
<div id="myEditor">test</div>
</form>
<script type="text/javascript">
//<![CDATA[
dojo.require("dijit.form.Form");
dojo.require("dijit.Editor");
dojo.addOnLoad(function() {
new dijit.Editor({}, dojo.byId("myEditor"));
new dijit.form.Form({}, dojo.byId("testme"));
});
//]]>
</script>
Is this a bug? Or am I missing something else?
Best regards,
Ganesh
Ganesh schrieb:
> Creating the form declaratively also works:
>
> <form id="testme" dojoType="dijit.form.Form">
> <div dojoType="dijit.Editor">test</div>
> </form>
>
> It's only the programmatic approach that fails. What is happening here?
>
> Best regards,
> Ganesh
>
> Ganesh schrieb:
>> Hi,
>>
>> Nesting a dijit.Editor inside a dijit.form.Form makes the editor
>> unfunctional for me.
>> Is there anything I am missing? With this example the editor doesn't
>> work, but after commenting
>> the "new dijit.form..." line it suddenly works. Any ideas how to get
>> this to work?
>>
>> <form id="testme" >
>> <div dojoType="dijit.Editor">test</div>
>> </form>
>> <script type="text/javascript">
>> //<![CDATA[
>> dojo.require("dijit.form.Form");
>> dojo.require("dijit.Editor");
>> dojo.addOnLoad(function() {
>> new dijit.form.Form({}, dojo.byId("testme"));
>> });
>> //]]>
>> </script>
>>
>> Best regards,
>> Ganesh
>>
>>
>>
>
More information about the Dojo-interest
mailing list