Wrox Programmer Forums
|
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 March 2nd, 2007, 01:30 PM
Authorized User
 
Join Date: Feb 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default Plz Help ASAP

I have a web application , which gives the user the ability to input some values (text,) .Once the user inputs those values and press start it reads a default file from a folder and then writes these entered text at the bottom of the file ..Now say i have 10 lines of text in there , and i need to put a certain entered text at say line 5 or so, then how could i do that...
Plz adivse ....

 
Old March 2nd, 2007, 01:47 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There are several ways to do this - but I am not clear exactly what you are asking.
Typically, to randomly insert data into a file in the simplest case means you are going to re-write the file.

If the file is relatively small, you would read in the entire file into a string (or array or whatever mechanism that you choose), determine the location where you want to insert the text and modify the string by inserting that text, and then output the file.

If the file is large you might want to read the file in one line at a time (or one chuck at a time or whatever mechanism you want to use) and stream it right back out to another file, until you find the place you need to insert your text - then output that to the new file, then continue to read the original file outputing it into the new file. If that makes sense. When done - you kill the old file and rename the new one.

Woody Z
http://www.learntoprogramnow.com
How to use a forum to help solve problems
 
Old March 2nd, 2007, 04:45 PM
Authorized User
 
Join Date: Feb 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey woody thanks , i would try doing that .....
i have one more question :
I need to include one more folder name with the following line of code.
document.forms['Tool_form'].t_dir.value = "c$\\Tools\\"+(new String(document.forms['Tool_form'].projName.value)).replace(/ /g,"_");

the other name would be from a different form though on the same file :
Tool_Submitform and the name that i want to include would be that whole thing\T+(<input type="hidden" name="t_num" id="t_num">)

for example : c:\Tools\projName\Tt_num -> where t_num could be 0,1,2...
Could you please guide me on that ??



 
Old March 2nd, 2007, 05:55 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hm. You are wanting to work with files on the client machine? Or are you just selecting the folder and files you will be working with on the server?

I am assuming you are working with files on the server.

Okay - is it that you are asking how to get values dynamically from dom elements, and then use them to build a string that will also dynamically be displayed on another form in the html document? Or...? It isnt' clear to me what you are asking.



Woody Z
http://www.learntoprogramnow.com
How to use a forum to help solve problems





Similar Threads
Thread Thread Starter Forum Replies Last Post
plz.....plz solve out my problem.... kethireddy435 ASP.NET 1.x and 2.0 Application Design 1 October 4th, 2007 12:56 PM
plz help me ASAP developer.ibm Java Basics 4 August 22nd, 2007 12:32 PM
Need Help ASAP coding C# 1 June 6th, 2007 12:41 AM
Plz Help ASAP phantom3008 Classic ASP Databases 33 February 16th, 2007 10:50 PM
HELP! HELP! Please ASAP iamucha Access 2 March 25th, 2004 11:42 AM





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