File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes cant i access javascript variable after opening ms-word Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "cant i access javascript variable after opening ms-word" Watch "cant i access javascript variable after opening ms-word" New topic

cant i access javascript variable after opening ms-word

kesava chaitanya
Ranch Hand

Joined: Aug 15, 2001
Posts: 140
i have one jsp file;in that i have written
<script language="JavaScript">
i am able to see ms-word document but i couldnt see output ss on the word document;will jsp doesnt access javascript after calling response.setContentType(("application/ms-word")?;if i want to see ss on the word document thru javascript wat i have to do;
plzz help
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
We don't have many rules at Javaranch, but our naming policy is one of them. Please read this policy and change your display name to comply with it if you wish to continue posting. Thanks.
You can change your display name here.
Also you are not eligible for the book giveaway if your display name does not comply with the policy.

Matthew Phillips
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
I'm surprised that MS-Word doesn't complain anything. You need to do much more than just tell the web browser "I'm sending you a Word document" -- you also need to generate the .doc file!
There is an open source project at, which aims to provide Java developers libraries for reading and writing MS Office file formats but unfortunately the Word project is still in its infancy (at least it was when I last checked).

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9058
Moving to the HTML and JavaScript forum.

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
It is sorta covered in the JavaRanch Style Guide.
subject: cant i access javascript variable after opening ms-word
It's not a secret anymore!