--- loncom/interface/lonfeedback.pm	2004/07/09 23:05:52	1.99
+++ loncom/interface/lonfeedback.pm	2004/07/23 20:01:46	1.99.2.1
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.99 2004/07/09 23:05:52 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.99.2.1 2004/07/23 20:01:46 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -635,7 +635,7 @@ Attachment (128 KB max size): <input typ
 </p>
 </form>
 ENDDOCUMENT
-$r->print(&generate_preview_button().
+$r->print(&generate_preview_button($onsubmit).
 &Apache::lonhtmlcommon::htmlareaselectactive('comment').
 '</body></html>');
 }
@@ -1114,13 +1114,14 @@ sub show_preview {
 }
 
 sub generate_preview_button {
+    my ($onsubmit)=@_;
     my $pre=&mt("Show Preview");
     return(<<ENDPREVIEW);
 <form name="preview" action="/adm/feedback?preview=1" method="post" target="preview">
 <input type="hidden" name="subject">
 <input type="hidden" name="comment" />
 <input type="button" value="$pre"
-onClick="document.mailform.onsubmit();this.form.comment.value=document.mailform.comment.value;this.form.subject.value=document.mailform.subject.value;this.form.submit();" />
+onClick="$onsubmit;this.form.comment.value=document.mailform.comment.value;this.form.subject.value=document.mailform.subject.value;this.form.submit();" />
 </form>
 ENDPREVIEW
 }