The following line in the laszlo code has to be fixed, quoting the JS function name....

    mapa.callJavascript('SaveText', del);


Also, not to divert this thread, but I am noticing that when compiled to SWF, and using Firefox 3.5, html pages displayed in the html view "flicker" (NOT visible most of the time, unless clicked on and they flicker momentarily).  In IE7, it displays normally.   DHTML works ok in both browsers.

You can test this here:   http://labs.openlaszlo.org/trunk-nightly/docs/reference/lz.html.html
You should see a Google search page, but for me all I see is blue, unless I drag the view around, then the it flickers visible momentarily.

-Matthew


On 08/07/2009, Max Carlson wrote:
There are a number of issues with your HTML form. As it's written, you'll never get a response because the form element isn't referenced correctly. Try this:
<html>
    <head><title></title>
        <script type="Text/_javascript_">
            function SaveText(){
                var myText=theform.TheText.value;
                return myText;
            }
        </script>
    </head>

    <body>
        <form name="theform">
        <input type="text" width="400" name="TheText" id="TheText"/>
        <input type="button" value="test" />
        <form>
    </body>
</html>


Sebastian Blanco Cicenia wrote:
  
Hi max,

        I've tried CallJavaScript() method to invoke one _javascript_ in the
HTML page wich contains TinyMce, but i have not results.

apart from that, i tried with a simple HTML with a textbox and i failed
again.

I think the problem is when i call the script from laszlo...

The retVal i use in my class, always return "undefined"

I've been fighting with this for days!!!

This is my html code.
<html>
        <head><title></title>
                <script type="Text/_javascript_">
                        function SaveText(){
                                var myText=theText.value;
                                return myText;
  
} </script>
        </head>
        
        <body>
                <input type="text" width="400" name="TheText" id="TheText"
/>
        </body>
</html>
        

And this is my laszlo code, using an example of a web.

        <class name="DHTMLComponent" extends="view"
visible="${parent.visible}">
                
                <!--- The iframe component -->
                <html id="mapa" src=""true"
 rel="nofollow" href="http://localhost:8010/sql/prueba.html%22">http://localhost:8010/sql/prueba.html";
width="650" height="500" />
                
                <button id="guardar" width="80">Save
                        <handler name="onclick">
                                var del = new LzDelegate(this,
'handleFunc1');
  
mapa.callJavascript(SaveText, del); </handler>
                        <method name="handleFunc1" args="retVal">
                                Debug.write("DHTMLComponent handleFunc1: " +
retVal);
                        </method>
                </button>
    </class>

<!-- here is the implementation-->        
<window name="win_PedidosPendientes" width="800" height="800"
resizable="true" closeable="true" x="${tab_Opciones.width + 150}"
valign="middle" visible="false">
        <DHTMLComponent name="comp" width="500" height="500" y="120" />
</window>


-----Mensaje original-----
  
De: Max Carlson [mailto:[email protected]] Enviado el: Martes, 04 de Agosto de 2009 08:06 p.m.
Para: Sebastian Blanco Cicenia
CC: laszlo-user community discussion
Asunto: Re: openLazlo with tinyMce

(I added laszlo-user so this reply ends up on the mailing list)

Hi Sebastian,

Here's the documentation for the html tag:
http://labs.openlaszlo.org/trunk-nightly/docs/reference/lz.html.html

  
You could use the callJavascript() method to invoke some _javascript_ in the HTML page containing tinyMce, which could return the HTML from the editor. Then you could save it using an LZX dataset. Or, you could implement something using pure _javascript_ APIs inside your HTML. Let me know how it goes!
Sebastian Blanco Cicenia wrote:
  
Hi max, i was reading this page http://www.mail-archive.com/[email protected]/msg05187.html becouse i am trying to implement tinyMce into openLazlo.
I have done it, using <html> tag.

But i can't find the way to save the information inside the tinyMce.

Can you help me please?

Thanks!

Sebastian Blanco

    
--
Regards,
Max Carlson
OpenLaszlo.org
  

Reply via email to