<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 10/mar/08, at 16:56, diakat 2000 wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Steven,<br><br>yes, I know about that.<br>So, it seems, that there is no possibility to mix C/C++ and javascript.</blockquote><div><br class="webkit-block-placeholder"></div><div>It's impossible to mix C and javascript because javascript is client-side (browser) and the C code in klone files (.kl1) is server-side. </div><div><br class="webkit-block-placeholder"></div><div>KLone gives the ability to run both client and server on the same machine, but this usually isn't the case over the web...</div><div><br class="webkit-block-placeholder"></div><blockquote type="cite">Maybe, is it possible to set a variable with javascript and read it<br>out with C/C++?<br><br>Explanation:<br>I will have serval buttons on a form. For example to edit a table: one<br>button for saving, one button for inserting a new row, one button for<br>deleting an existing row... So, there's why I have to know, which<br>button was clicked.</blockquote><div><br></div><div>Since we are talking about the HTTP protocol, the only way to interface with C code is via forms (<a href="http://www.w3.org/TR/html4/interact/forms.html)">http://www.w3.org/TR/html4/interact/forms.html)</a>. Usually you would use the "name" parameter to identify elements. You can simply parse such parameter in C code...</div><div><br class="webkit-block-placeholder"></div><blockquote type="cite">Many thanks</blockquote><div><br class="webkit-block-placeholder"></div>cheers,</div><div>sd</div><div><br class="webkit-block-placeholder"></div><div><br><blockquote type="cite">2008/3/10, Steven Dorigotti <<a href="mailto:dorigotti@koanlogic.com">dorigotti@koanlogic.com</a>>:<br><blockquote type="cite"><br></blockquote><blockquote type="cite">Hi,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> If you have a look at the definition of the onclick parameter<br></blockquote><blockquote type="cite">(<a href="http://www.w3schools.com/jsref/jsref_onclick.asp">http://www.w3schools.com/jsref/jsref_onclick.asp</a>), you'll<br></blockquote><blockquote type="cite">see that it's javascript-specific.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> If you want to post parameters to C code you should be posting variables<br></blockquote><blockquote type="cite">to a page and retrieving them from the taget page using request_get_arg()...<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Check out the tutorial for an example:<br></blockquote><blockquote type="cite"><a href="http://koanlogic.com/klone/tut.html">http://koanlogic.com/klone/tut.html</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">good luck!<br></blockquote><blockquote type="cite">sd<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On 10/mar/08, at 14:43, diakat 2000 wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Hello,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I've just another newbie question: How could I do event handling with<br></blockquote><blockquote type="cite">C/C++ functions?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I've a form with serveral input field. I' m able to access on a sqlite<br></blockquote><blockquote type="cite">database and display some values in the fields. Now I want to save<br></blockquote><blockquote type="cite">user changes back in database. But something goes wrong. My code looks<br></blockquote><blockquote type="cite">like:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">// C method<br></blockquote><blockquote type="cite">int dbSaveDescriptionAll ()<br></blockquote><blockquote type="cite">{<br></blockquote><blockquote type="cite">... saving all Fields in database (sqlite)<br></blockquote><blockquote type="cite">return 1;<br></blockquote><blockquote type="cite">}<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">// my form<br></blockquote><blockquote type="cite"> <form action ="testpage.kl1" method ="post" enctype="multipart/form-data"><br></blockquote><blockquote type="cite"> .... // some input-fields<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">// my form button<br></blockquote><blockquote type="cite"> <% io_printf (out, <input type= \"button\" name = \"bt_save"<br></blockquote><blockquote type="cite">value=\"save\" onclick= \"dbSaveDescriptionAll()\"/>");<br></blockquote><blockquote type="cite">%><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">It seems that the function dbSaveDescriptionAll() is uncalled.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I hope somebody could tell me what I'm doing wrong.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Ciao<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">Klone-users mailing list<br></blockquote><blockquote type="cite"><a href="mailto:Klone-users@koanlogic.com">Klone-users@koanlogic.com</a><br></blockquote><blockquote type="cite"><a href="http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users">http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite"> Klone-users mailing list<br></blockquote><blockquote type="cite"> <a href="mailto:Klone-users@koanlogic.com">Klone-users@koanlogic.com</a><br></blockquote><blockquote type="cite"> <a href="http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users">http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><br>_______________________________________________<br>Klone-users mailing list<br><a href="mailto:Klone-users@koanlogic.com">Klone-users@koanlogic.com</a><br><a href="http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users">http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users</a><br><br></blockquote></div><br></body></html>