--- loncom/interface/lonfeedback.pm 2004/07/23 20:01:46 1.99.2.1 +++ loncom/interface/lonfeedback.pm 2004/07/27 14:29:03 1.99.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.99.2.1 2004/07/23 20:01:46 albertel Exp $ +# $Id: lonfeedback.pm,v 1.99.2.2 2004/07/27 14:29:03 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -552,11 +552,6 @@ sub mail_screen { } my $latexHelp=&Apache::loncommon::helpLatexCheatsheet(); my $htmlheader=&Apache::lonhtmlcommon::htmlareaheaders(); - my $onsubmit=''; - if ((&Apache::lonhtmlcommon::htmlareabrowser()) && - (!&Apache::lonhtmlcommon::htmlareablocked())) { - $onsubmit='document.mailform.onsubmit();'; - } my $send=&mt('Send'); $r->print(< @@ -600,7 +595,9 @@ $htmlheader } if (rec) { - $onsubmit + if (typeof(document.mailform.onsubmit)!='undefined') { + document.mailform.onsubmit(); + } document.mailform.submit(); } else { alert('Please check a feedback type.'); @@ -635,7 +632,7 @@ Attachment (128 KB max size): ENDDOCUMENT -$r->print(&generate_preview_button($onsubmit). +$r->print(&generate_preview_button(). &Apache::lonhtmlcommon::htmlareaselectactive('comment'). ''); } @@ -1114,14 +1111,13 @@ sub show_preview { } sub generate_preview_button { - my ($onsubmit)=@_; my $pre=&mt("Show Preview"); return(< +onClick="if (typeof(document.mailform.onsubmit)!='undefined') {document.mailform.onsubmit();};this.form.comment.value=document.mailform.comment.value;this.form.subject.value=document.mailform.subject.value;this.form.submit();" /> ENDPREVIEW }