Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1497 How can I print on the printer the value of a textboxt?

You are here: irt.org | FAQ | JavaScript | Print | Q1497 [ previous next ]

Try:

<script language="JavaScript"><!--
if (window.print) {
  text = document.mxForm.myTextarea.value;
  winId = window.open('','newwin');
  with (winId.document) {
    write('<body onLoad="window.focus();window.print()"><pre>'+text+'</pre><\/body>');
    close();
  }
}
//--></script>

©2018 Martin Webb