Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 15th, 2004, 05:46 AM
Authorized User
 
Join Date: Aug 2004
Location: , , .
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default data to textarea

Hi,

  I am retrieving some data from the database and forming an aligned string. I am displaying that value in the textarea control.
How come, the textarea places some extra spaces at the beginning that was not in the string.

<textarea rows="5" cols="40" id="txtoutput">
<%=stroutput%>
</textarea>

It displays extra spaces in the begining in textarea. How to overcome this? This will change my formatted output.



 
Old December 15th, 2004, 05:50 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Try...
Code:
<textarea rows="5" cols="40" id="txtoutput"><%=stroutput%></textarea>
HTH,

Chris

 
Old December 15th, 2004, 07:43 AM
Authorized User
 
Join Date: Aug 2004
Location: , , .
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

  Thanx. I got it. I wonder.
And, How can i save this textarea data to client system as a textfile.
I am using filesystemobject to create a text file with the path

set fso=server.createObject("scripting.filesystemobjec t")
set ctext=fso.createtextfile("c:\mydata.txt",true)
ctext.close
set ctext=nothing
set fso=nothing

But it is storing in the server c:
My users will access simultaneously in my LAN. They use these textfiles to print in DOS mode. Coz it contains large data and to print faster.
How can i store the generated output to the client system only instead of server.



 
Old December 15th, 2004, 07:57 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

Sorry to disappoint you. It is not possible to access client machine using a server side scripting language alone.

One possibility is to write the text to a HTML file at server side and then give a link to it in the page. People can download and print it. You may also start it print automatically by putting a window.print in the onload event of body tag.

If you want to save it to client machine, you may have to try using some applet or script host component.




Similar Threads
Thread Thread Starter Forum Replies Last Post
saving data from HTML textarea Durkee VB.NET 2002/2003 Basics 4 May 9th, 2008 09:25 AM
Echo Data To Textarea Box? robo_z Beginning PHP 1 February 9th, 2006 04:59 AM
Display text data in textarea from SQL query palvin Classic ASP Databases 0 November 29th, 2005 05:44 PM
Inserting "TextArea" field's data problem phungleon Classic ASP Databases 11 August 2nd, 2004 05:19 PM
Display data in textarea with select statement Alex_forever MySQL 6 April 27th, 2004 06:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.