Editing A Textfile

I am currently writing a script for a course i am doing, It lists all the files and folders on the server, and works similar to windows explorer ( if you click on the folder it shows the content ). I have enabled it so you can delete, view source, and download all files/folders.

Now theres one more thing i would like to do, and that is to enable the user to edit a file, and i am struggling quite a bit, any guidance, ideas or links to a similar tutorial. I am probably going about it completley the wrong way, I was trying to open the file read each line and write it into a textarea, so the user could edit it, and then save it.

View Replies


ADVERTISEMENT

ASP And TextFile

I would like to know how can I open a textfile from other website like www.website.com/jhon.txt.?

I want to open it in my default.asp, without remove my banners and buttons and all my Images, Im just want to open it in the middle of my asp page. How can I do that?

View Replies View Related

How To Append To A Textfile?

I cannot append to a textfile. This is my sample code:

set f=Server.CreateObject("Scripting.FileSystemObject")
set obj_log .CreateTextFile"C:loglog.txt",true)
obj_log.WriteLine("Added schedule by [Name]")
f.close
obj_log.close
Set obj_log=Nothing
Set f=Nothing

The problem is the next time i execute these lines from an asp page, it does not append in a new line. I cannot figure out how.It just keep on overwriting.

View Replies View Related

Asp Guestbook W/ Textfile

i need a asp script out there for a guestbook. all the form input will be stored to a normal txt file, not a database. anyone have any links out there for this ? i have found a couple, but got errors when setting them up and it's been the script, not the server.

View Replies View Related

TextFile Never Return

I cannot use the OpenTextFile method, it's never return and I get no
error message! Setting Response.Buffer=False, has no effect. No matter
if I use it ForReading or ForWriting, it never return. In the following
code, the problem occurs at line 3.

aFileName = Server.MapPath("WEB_PROD.htm")
set fs = server.CreateObject("Scripting.FileSystemObject")
set fso = fs.OpenTextFile(aFileName, ForReading, False)
s = ts.ReadAll
ts.Close
set ts = nothing
Response.Write s

View Replies View Related

Create Textfile Using Asp

i want to create atext file using asp(filesystemobject but my explorer hangs on. Why?

View Replies View Related

Cannot Append To Textfile

With the following code I can create a new textfile if it does not exist, but it seems impossible to me, to append data to an existing file.

Dim objOpenFile, objFSO, strPath
StrPath = Server.MapPath("../smslog.txt")
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")

If objFSO.FileExists(StrPath) Then
Set objOpenFile = objFSO.OpenTextFile(StrPath, ForAppending)
Else
Set objOpenFile = objFSO.CreateTextFile(StrPath, True)
objOpenFile.WriteLine "KundNr;Namn;Datum;Tid" 'header
End if
..
..
what I have done wrong?

View Replies View Related

Textfile Search

I'm trying to make a text file search that will read a text file looking for the string the user typed in, then if it finds the string i want it to display all the information on that line then continue it's search through the rest of the file repeating the previous step if needed.

What i've got so far is it reading the text file in and it can search for a particular string(word, name etc) and say whether or not its in the file, but i don't know how to get it to display the whole line of information and continue it's search.

View Replies View Related

Write And Read From Textfile

Alright im tryin 2 write 2 a text file and then read from tat text file on the same page is this possible this is what i got so far. Code:

View Replies View Related

Keyword Search A Textfile

I read a text file in ASP using readline. The line is stored in a variable. I want to be able to search that line for a specific word.

How do I go about this?

View Replies View Related

ASP RecordSet Output To A .CSV Textfile

After I've performed a query and held the data in a RecordSet (rsQuery), can
I dump the recordset into a comma separated text file? How?

View Replies View Related

Read Last Line In Textfile

I wuz just wondering, whats the easiest way to read a text files last line...

I know i have to count the lines and put pointer to the last line and read from there.. but i cant get the hang of it

heres my code:

View Replies View Related

Show Textfile In Browser

I'm pretty new to webprogramming. I use VWD 2008 Express Edition.
I try to build a webpage and the content of that page is stored in a
textfile on the filesystem. That way I can change the content of my webpage
very easy. The problem is that I can't figure out how to show the content of
that textfile in my browser.

View Replies View Related

DB Updating/Editing

I have a script on my asp page which takes values entered from a form and inputs it into a database, in their appropriate fields. It's been working fine, but lately I'm noticing that I've been getting some blank records being entered in my DB table.

I know it's not my form becuase there is no way to leave it entirely blank, so even if you don't enter anything... their are hidden fields which already contains a value that get's passed and goes into the DB.

I am wondering if this is a result of many people entering data into the access db at the same time, and i'm wondering if i have the right locktype parameter.

I am using adLockPessimistic right now... should that be adLockOptimistic or adLockBatchOptimistic????

and should the cursor type be adOpenDynamic???

View Replies View Related

Editing XML Using ASP + XMLDOM

I'm in the process of 'trying' to write a very small CMS which will allow me update an existing XML script I have.

Unfortunately I just cannot get the script to work, my script falls over with an objRoot error when I try to set the objField using selectsinglenode. XML looks like this:

View Replies View Related

Editing Asp File

Is it possible to edit an asp file using filesystem? when I read a
text file using filesystem it doesnt show me the asp code in the <%
tags as this code is run server side, but is there a way to read ande
edit this code from another asp file

View Replies View Related

Form Editing

It is saturday night and guess what i'm doing. Friggin geek.
anyway. I have another question for you guys. I have a form to send emails. But i want the user of the form to be able to edit the html content, so if he wants to add bold text he can just click a button and the <b></b> tags apear in the body textbox. Much like the options we have here press the button # and you get the quote tags on screen.
I looked all over but nobody seems to have anything on that particular feature. So i was wondering if any of you could tell me or at least point me on the right direction.

View Replies View Related

Editing .js File

I have a .js menu file that runs in all of my intranet
files.I have an asp calendar system where I can add
calendar names to a db and it will display these new
calendars. What I don't have is a good way to edit my .js
menu file to add a new menu item.
Can fso add a line to a .js file that is "live" on an
intranet or will it run into file locks? by iis?

View Replies View Related

Editing Many Rows At Once

We've been asked to upgrade the system and one of the common complaints is that they often have to edit just one field, but for all the students. Currently you have a list of students and you have to click each one and go to their summary page before you can edit anything.

So they've asked if there is there any way of creating a 'spreadsheet like' view of my data and allowing the user to edit and either save everything, or save each row as they go (without causing a page refresh).

I managed to get a basic idea up and running, involving lots of wee forms or one big form... but my ASP ended up creating 266 SQL queries to do the saving (one for each pupil) ... and the script would just take forever. Code:

View Replies View Related

Editing Record

I have a recordset where when a user uploads a file, the field on the recordset will create the word "Processing". Once the Administrator logs on and gets the uploaded file, it will provide that record with a File Number. The problem I am having is that when I go in the form to create the "File Number", the field where it printed the date of the upload, disappears.....

View Replies View Related

Editing ASP Pages

Can you edit ASP pages using dreamweaver without being connected to a test server? If so, how?

View Replies View Related

Editing MS Word

Does anybody know how to edit an existing word document using ASP or VBScript. For instance, I have some text in the doc that I want to change to something else. Is this possible?

View Replies View Related

Textbox Editing

I know how to read a file system object and output it to the browser page. The desired result would be to put that file into a textbox on the screen for a user to modify and then write the file back to the file system.

The concept seems simple enough, read the text file into a variable then some magic asp will put it into a textbox value, then somehow take that value and write the file. I know how to write files to the system as well. I am missing a key piece.. any ideas?

View Replies View Related

Editing XML Data In ASP

What is the best Method, for deleting or editing existing XML Data? I have a form that submits to XML via ASP using VBScript. I now need to pull data into another ASP page which allows for either Editing or Deleting Individual fields.

I know I can use XSL but is there any better methods as the original form imports data into the Drop Down lists?

View Replies View Related

Editing Databases

I can get the data from my database to be displayed in a table, but how can i get the data to be displayed in a way that it can be edited? Can i populate a form from the database? If i can, how would i go about it please?

View Replies View Related

Tab Lite And Editing

i have been using Notetab Lite for PHP, Perl and HTML editing. I see it can be used for ASP work. There is a fair amount of files (ASP) to modify; will NoteTab Lite do the job? The files have quite a bit of VBScript code in them. I have heard that Crimson Editor is better than NoteTab Lite, for ASP work. I notice that Crimson editor 'color highlights' the VBS and the xhtml code, which is easier to view than Note Tab Lite.

I would like an editor that will be able to syntax check the VBScript code, if possible. Also, is there any method of viewing ASP files locally . This would save me lots of uploading/testing the modifications, if I could test locally (i) the syntax of both the VBS and xhtml code , and (ii) See what the form looks like. The ASP application uses an MS Access database. I do have Access 2000 Developer and VBA.

View Replies View Related

Editing Outlook Web Access

Has anyone had any luck editing the Microsoft Outlook Web Access pages? I am setting up my company's new OWA 2003 server. Now here's the problem, I had to create new logon pages because we authenticate to a different domain then the server is on (stupid mergers).

Now when the logout button is clicked on the page, it takes you back to the default logon page. Were a user to try and log back in from here it wouldn't work. Now simply adding a "response.redirect" to that page seems to break their code completely. So has anyone managed to do this and could let me know how?

View Replies View Related

Error Editing File

When I type out my new stuff in the edit field I click submit and get this error. The next post is my code for the entire page.
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/hwnetwork/edit1.asp, line 110

View Replies View Related

Editing Choices In Checkboxes

I am working on the form where the client can go back and uncheck and check collections to be assigned. This is in a different table. The collections come from a table called Collections.

The products table adds collectionID of each collection selected in the RelProdCollection Table. I need to be able to allow the user to edit the collections by unchecking and checking check boxes on the form. Let me show you my code.

Code That Displays All of the Collections dynamically in a check box. But it doesn't show the values if there are some collections that are checked by a product with a productID of 4. I need that code:

View Replies View Related

Editing An Access Database With SQL And ASP

I can edit information in tables no problem with insert delete etc etc. My question: is it possible to edit the tables themselves ie make new fields, tables etc! If so can someone provide a simple example or point me to a tutorial im sure I will pick it up pretty quick but I have no idea where to start!

View Replies View Related

Web Based File Editing

Is it possible to write a web based text editor? For example, is there a way to edit an asp file using an asp file? Here is what I have so far but instead of displaying the asp code it just displays the output html, Can I display the asp code so I can edit files without being at my computer and not using FTP?

Here is the current code:
Code:
<textarea name="editor" rows="35" cols="120">
<!-- #include file="default.asp" -->
</textarea>

View Replies View Related

Interface For Editing SQL DB Tables

I'm moving away from Access db's to MS SQL Server databases for storing form records.
While the MS SQL Server provides all the tools I need to edit/delete/add records, I need to provide an interface for non-technical people for obvious reasons.

I have a halfway decent one for manipulating Access databases but it doesn't seem to translate over to SQL Server too well. Obviously I'm fairly new to ASP and SQL but I've tried everything to make this editor work for SQL server.

So, I would like to just start from scratch and ask if anyone has an asp script that acts as a front-end to edit/delete/add records - nothing too fancy.

View Replies View Related

Editing A Text File

I have been searching the web for hours trying to find a simple tutorial or code example for what i need, but i have had no luck. What i need is very simple. I have an asp news page which will simply feed off a .txt file (hopfully maintaining line breaks).

All i want is another simple asp page which will display the content of that text file in a html form (one field), so that the user can simply edit or add to the text using that form, click submit and the text file will be updated.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved