Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Script for File Handling

 
Anurag Mishra
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to write a java script which will read a file from a directory then it will match a word <HTML> in a file and then it will append <TEST>
just before the <HTML>.
If anyone has done this type of java script or have some idea pls reply.
thanks in advance.
 
Tom Blough
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaScript does not allow access to the underlying file system. I don't think you will be able to do what you want. If this is a program that will run on a local machine, you could use Java or any other programming language to accomplish this.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this operation is to be performed on the server, a servlet is probably your best bet. If this is a client-side operation you are out of luck as no client-side file access can be performed (think of the security implications otherwise) except via a signed applet.
bear
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic