2012-01-03 146 views
0

我想获得dojo编辑器的价值并将其附加到隐藏的输入。此代码:丰富的编辑器 - 获取值

onClick="dojo.byId('editorContent').value = this.getValue() 

如果我把它放在编辑器的div中,它可以正常工作。不过,我想在发送表单隐藏的输入之前更新。我已经尝试使用onclick和onsubmit,但没有奏效。 也许这是错误的:

content.getValue() 

代码

<form> 
    <div id="descricao_oferta"> 
     <input type="hidden" name="item[editorContent]" id='editorContent' /> 
     <div dojoType="dijit.Editor" id="content" height='200px'"> 
     <?php echo isset($arr['conteudo']) ? $arr['conteudo'] : "Descrição";?> 
    </div> 
<form> 

    <input id="send" name="send" type="submit" value="Registo" onClick="dojo.byId('editorContent').value = content.getValue()"/> 

</form> 

如何更新与提交表单时,编辑器的内容隐藏的输入?

similar problem

回答

1

source

这是正确的方式:

onClick="dojo.byId('editorContent').value = dijit.byId('content').get('value')" 
相关问题