Hi Cliff,

Thanks for your reply. I fear I wasn't clear enough. I read about
the .change and .val functions, however, I couldn't figure out how to
get from the JavaScript function to querying the database and back to
the JavaScript function.

I have the following view:


{{extend 'admincms/layout.html'}}

<div class="box">
  ...
    {{=form}}
  ...
</div> <!-- box -->
<script>
jQuery(document).ready(function(){
  jQuery('#mail_subject').change(function(){
    subject=jQuery('#mail_subject').val();
    value=...
    jQuery.('mail_text').val(value);});
});
</script>



Here ... based on subject the database should be queried for the
corresponding text, which should then be put in the mail_text text
area.


Kind regards,

Annet.

Reply via email to