Current location: Hot Scripts Forums » General Web Coding » JavaScript » print textarea


print textarea

Reply
  #1 (permalink)  
Old 08-29-03, 07:46 AM
prenaud prenaud is offline
New Member
 
Join Date: Aug 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
print textarea

Hi,

I'm using a script that prints the content of a textarea. I don't know how to deal with the paragraphs. The appear as long lines and only the beginning gets printed.

The print script is on this page:
http://fslactivities.sd61.bc.ca/editez/

I tried inserting HTML tags with pw.document.open("html"); and have the text appear in a table but that didn't work. Beside, I want to be able to print code as well.

Pierre

Here's the script.

function pt()
{
pw = window.open("","_blank","width=760,height=500,menu bar=yes");
pw.document.open("text/plain");
pw.document.write(document.plaintext.message.value );
pw.document.close();
if(window.print){pw.print()}
else{pw.alert("Use the menu to print the page or CTRL-P")}
}
Reply With Quote
  #2 (permalink)  
Old 08-29-03, 07:58 PM
nd2 nd2 is offline
Wannabe Coder
 
Join Date: Jun 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
replace the new lnes with <br>, normal new lines have no value in html.
__________________
IonCMS (Coming Soon.)
http://ioncms.com
--
Ncaster (Free php/mysql cms)
http://ncaster.cjb.net
Reply With Quote
  #3 (permalink)  
Old 08-29-03, 08:13 PM
prenaud prenaud is offline
New Member
 
Join Date: Aug 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Hi nd2,

I'm sorry but I don't understand what you want me to do. Did you have a look at the link?

Pierre
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] Hello World Antitrust PHP 10 10-14-03 01:27 PM
Headline grabber help! -WB0- Perl 2 09-29-03 12:24 AM
print problem sal21 JavaScript 0 09-09-03 11:04 AM
Advance print selection script vaseline Script Requests 1 09-07-03 09:41 AM
Perl code : print "." x 20; - How to do it with PHP ? kevin PHP 2 07-04-03 04:29 AM


All times are GMT -5. The time now is 10:47 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.