document.compose.Body.value won't be updated on text input (OTRS 2.4.9)

"Obee, Daniel" <[email protected]>
Newsgroups gmane.comp.otrs.devel
Message-ID <6C4C03F6CE6BE549B8DBFB341BFD687E9B0AD85C@berlinexs01.myhammer.intra>
Hi all,

we're currently running 2.4.9 with RichText enabled.

I'm trying to block email sending if a mail contains placeholders (XXX). Therefor I tried to modify the function submit_compose in the AgentTicketCompose.dtl.

function submit_compose() {
    var reg = /(xxx|XXX)/ ;

[snip]

     else if ( reg.test(document.compose.Body.value) == true ) {
        alert('$JSText{"There are still placeholders to be filled out!"}');
        document.compose.Body.focus();
        return false;
    }

[snip]

The RegEx works and if the text is found I get the alert. Unfortunately it seems the document.compose.Body.value is not updated when I alter the text in the RichText editor. Reading out the variable I continue to get the original body instead of the current content of the editor field.

Any ideas?

Greets & thanks
Daniel

_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.