Re: [SMARTY] Executing a function after <SELECT ONCHANGE=
| From: | Georges Berscheid | Date: | Fri, 29 Nov 2002 12:41:48 +0000 |
| Subject: | Re: [SMARTY] Executing a function after <SELECT ONCHANGE= | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6599@lists.php.net to get a copy of this message | ||
Hi,
please note the difference between server-side scripts (php, smarty) and client-side scripts (javascript).
If you don't want your code to be visible to the users, you will have to submit a form, or redirect to a url, let the server execute the script (php, smarty) and send a response back to the user, which is probably not what you want because the behaviour is somewhat different to the javascript-behaviour.
Georges
Pieter Van Winckel wrote:
Does anybody know of its possible to execute code similar to executing javascript with an OnChange="" event. Like for example the user selects something in a <SELECT> (which is an OnChange event) and then the code would execute an update of a text field somewhere else. The OnChange event is useable if you use javascripting, but i dont wan't to see the javascript. I would like to use something like $smarty->register_function(...); or something like causing a submit to happen when something changes in the <SELECT>. Anybody any ideas? Is it all possible using only smarty and php? Thanks for reading anyway, Pieter