[Dojo-interest] Problem getting the editor content
Davide
dojo at consulvision.it
Thu Feb 15 04:14:08 MST 2007
On Thu, 2007-02-15 at 10:55 +0100, Nicola Rizzo wrote:
> try this:
> ...
> function myFunction()
> {
> var mailing_message =
> dojo.widget.byId("mailing_message").getEditorContent();
> alert(mailing_message);
> }
It works! The matter was the "var" before the variable name (the go()
function is useless): with var it works, otherwise it doesn't works.
Fun.
Thanks a lot,
Davide
> 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
> >
> >
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dojotoolkit.org/pipermail/dojo-interest/attachments/20070215/6deaf77e/attachment.html
More information about the Dojo-interest
mailing list