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" onclick="alert(SaveText())"/>
<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="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