views:

423

answers:

2

I need to open a text file to read the contents and then insert them into the document.

A: 

Javascript does not allow access to your computer's operating system, files or directories for security reasons, therefore there is no way to access the text file directly using Javascript.

Usually a server-side technology such as PHP, Adobe Coldfusion, Java or .NET (for example) is used to upload the file via a HTML form submission, read it and do whatever it needs to do.

I hope that helps.

Ciaran Archer
A: 

search on google for indesign scripting