--- loncom/interface/lonfeedback.pm 2004/07/23 19:58:40 1.104 +++ loncom/interface/lonfeedback.pm 2004/07/24 18:13:04 1.105 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.104 2004/07/23 19:58:40 albertel Exp $ +# $Id: lonfeedback.pm,v 1.105 2004/07/24 18:13:04 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -864,11 +864,6 @@ END } 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(< @@ -912,7 +907,9 @@ $htmlheader } if (rec) { - $onsubmit + if (typeof(document.mailform.onsubmit)!='undefined') { + document.mailform.onsubmit(); + } document.mailform.submit(); } else { alert('Please check a feedback type.'); @@ -959,7 +956,7 @@ Attachment (128 KB max size): ENDDOCUMENT -$r->print(&generate_preview_button($onsubmit). +$r->print(&generate_preview_button(). &Apache::lonhtmlcommon::htmlareaselectactive('comment'). ''); } @@ -1758,14 +1755,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 }