HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old December 4th, 2003, 06:35 PM
Represas Represas is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 12 Represas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy write to e text file

I like to know how can i write to a text file the words that i have in a textare by a click in a button, in javascript..

Another question i have is: someone knows where can i find a javascript help file?... like a msdn helping vb c++....




[Represas]

Reply With Quote
  #2  
Old December 4th, 2003, 10:15 PM
dcarva's Avatar
dcarva dcarva is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 633 dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 9 h 18 m 20 sec
Reputation Power: 6
Javascript cannot write to files. But you can pass the info to an ASP page and have ASP do it.

For javascript help, go to http://devedge.netscape.com/central/javascript/.

Reply With Quote
  #3  
Old December 5th, 2003, 04:48 AM
Represas Represas is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 12 Represas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thnaks dcarva.
And about javaScript help file? do you know someone? where can I donwload one?

Reply With Quote
  #4  
Old December 5th, 2003, 04:51 AM
Represas Represas is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 12 Represas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
oh sorry... i don't see that url... Thanks

Reply With Quote
  #5  
Old December 5th, 2003, 09:11 PM
shamrog12's Avatar
shamrog12 shamrog12 is offline
Newton's Apple Wizard
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 1,661 shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Weeks 2 Days 2 h 39 m 22 sec
Reputation Power: 34
Send a message via AIM to shamrog12
This is how you write to a file in ASP...

This is the code for APPENDING to a text file. This means what is already in the file will NOT be overwritten.

Code:
<% 
Dim Stuff, myFSO, WriteStuff 
'this is what we will write in the file 
Stuff = "Here is some stuff to write in the file." 
'this line creates an instance of the File Scripting Object named myFSO 
Set myFSO = CreateObject("Scripting.FileSystemObject") 
'this line opens the file, notice the 8, it will cause the script to append to the file 
Set WriteStuff = myFSO.OpenTextFile("C:\Inetpub\wwwroot\myNewFolder\myNewText.txt", 8, True) 
'this line actually writes STUFF from above to the file 
WriteStuff.WriteLine(Stuff) 
''this line closes the file 
WriteStuff.Close 
'this line destroys the instance of the File Scripting Object named WriteStuff 
SET WriteStuff = NOTHING 
'this line destroys the instance of the File Scripting Object named myFSO 
SET myFSO = NOTHING 
%> 


This is the code for WRITING to a file. It will do just the opposite of the above. It will OVERWRITE anything already in the file.

Code:
<% 
Dim Stuff, myFSO, WriteStuff 
'this is what we will write in the file 
Stuff = "Here is some stuff to write in the file." 
'this line creates an instance of the File Scripting Object named myFSO 
Set myFSO = CreateObject("Scripting.FileSystemObject") 
'this line opens the file, notice the 1, it will cause the script to write to the file (overwriting existing text) 
Set WriteStuff = myFSO.OpenTextFile("C:\Inetpub\wwwroot\myNewFolder\myNewText.txt", 8, True) 
'this line actually writes STUFF from above to the file 
WriteStuff.WriteLine(Stuff) 
''this line closes the file 
WriteStuff.Close 
'this line destroys the instance of the File Scripting Object named WriteStuff 
SET WriteStuff = NOTHING 
'this line destroys the instance of the File Scripting Object named myFSO 
SET myFSO = NOTHING 
%> 

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > write to e text file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT