[Dojo-interest] Problem getting the editor content

Nicola Rizzo nicola.rizzo+dojo at gmail.com
Thu Feb 15 02:55:26 MST 2007


try this:
...
  function myFunction()
  {
    var mailing_message =
dojo.widget.byId("mailing_message").getEditorContent();
    alert(mailing_message);
  }
  function go(){
	dojo.event.connect(dojo.byId("myButton"), "onclick", myFunction);
  }
  dojo.addOnLoad(go);
</script>

<body>

<form id="mailing_form" name="mailing_form" method="post"
action="ajax.php" target="x">

  <div dojoType="Editor2" id="mailing_message">mycontent</div>

  <input id="myButton" type="button" value="test" />

</form>
...

        Nicola

On 2/15/07, Davide <dojo at consulvision.it> wrote:
>
>  Hello all,
>          I've a problem getting the content of an editor2 widget with
> Internet
>  Explorer. The function getEditorContent() works fine with firefox 2, but
>  I've a no-method-for-the-object error in IE 6.
>
>  This is my code:
>
>  <html xmlns="http://www.w3.org/1999/xhtml">
>
>    <head>
>      <title></title>
>      <meta name="GENERATOR" content="Quanta Plus" />
>      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
>      <script language="javascript" src="js/dojo.js"
> type="text/javascript"></script>
>    </head>
>
>  <script language="JavaScript" type="text/javascript">
>    dojo.require("dojo.widget.Editor2");
>
>    function myFunction()
>    {
>      mailing_message =
> dojo.widget.byId("mailing_message").getEditorContent();
>
>      alert(mailing_message);
>    }
>  </script>
>
>  <body>
>
>  <form id="mailing_form" name="mailing_form" method="post" action="ajax.php"
> target="x">
>
>    <div dojoType="Editor2"
> id="mailing_message">mycontent</div>
>
>    <input type="button" onclick="myFunction()" value="test" />
>
>  </form>
>
>  </body>
>  </html>
>
>
>  May be somebody know why IE6 doesn't work?
>
>  Thanks in advance,
>  Davide
>
>
>
>
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
>


More information about the Dojo-interest mailing list