[Klone-users] Onclick-Events

diakat 2000 diakat2000 at googlemail.com
Mon Mar 10 11:56:26 EDT 2008


Hi Steven,

yes, I know about that.
So, it seems, that there is no possibility to mix C/C++ and javascript.

Maybe, is it possible to set a  variable with javascript and read it
out with C/C++?

Explanation:
I will have serval buttons on a form. For example to edit a table: one
button for saving, one button for inserting a new row, one button for
deleting an existing row... So, there's why I have to know, which
button was clicked.

Many thanks




2008/3/10, Steven Dorigotti <dorigotti at koanlogic.com>:
>
> Hi,
>
>   If you have a look at the definition of the onclick parameter
> (http://www.w3schools.com/jsref/jsref_onclick.asp), you'll
> see that it's javascript-specific.
>
>   If you want to post parameters to C code you should be posting variables
> to a page and retrieving them from the taget page using request_get_arg()...
>
>   Check out the tutorial for an example:
> http://koanlogic.com/klone/tut.html
>
> good luck!
> sd
>
>
>
> On 10/mar/08, at 14:43, diakat 2000 wrote:
>
> Hello,
>
> I've just another newbie question: How could I do event handling with
> C/C++ functions?
>
> I've a form with serveral input field. I' m able to access on a sqlite
> database and display some values in the fields. Now I want to save
> user changes back in database. But something goes wrong. My code looks
> like:
>
>
> // C method
> int dbSaveDescriptionAll ()
> {
> ... saving all Fields in database (sqlite)
> return 1;
> }
>
> // my form
>   <form action ="testpage.kl1" method ="post" enctype="multipart/form-data">
>  .... // some input-fields
>
> // my form button
>   <% io_printf (out, <input type= \"button\" name = \"bt_save"
> value=\"save\" onclick= \"dbSaveDescriptionAll()\"/>");
> %>
>
> It seems that the function dbSaveDescriptionAll() is uncalled.
>
> I hope somebody could tell me what I'm doing wrong.
>
> Ciao
>
> _______________________________________________
> Klone-users mailing list
> Klone-users at koanlogic.com
> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>
>
>
> _______________________________________________
>  Klone-users mailing list
>  Klone-users at koanlogic.com
>  http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>
>




More information about the klone-users mailing list