jQuery in Action, 2nd edition*
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
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
Author

cant i access javascript variable after opening ms-word

kesava chaitanya
Ranch Hand

Joined: Aug 15, 2001
Posts: 140
hi
i have one jsp file;in that i have written
<%
response.setContentType("application/ms-word");
%>
<script language="JavaScript">
document.write("ss")
</script>
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
chaitu
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
kesava,
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
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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 http://jakarta.apache.org/poi, 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
Sheriff

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


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cant i access javascript variable after opening ms-word
 
Similar Threads
Null value in ActionForm after javascript submit()
WebLogic Server - Problem encoding file MS Word in jsp
Opening a MS Word Document from JSP using Relative URL
WebLogic Server - Problem encoding file MS Word in jsp
Error opening MS Excel report