jQuery in Action, 2nd edition*
The moose likes JSP and the fly likes opening a word document on localsystem in internet explorer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "opening a word document on localsystem in internet explorer" Watch "opening a word document on localsystem in internet explorer" New topic
Author

opening a word document on localsystem in internet explorer

blockhead silver
Greenhorn

Joined: Jan 20, 2013
Posts: 1
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script language="JavaScript">
function startWord(strFile)
{
var myApp = new ActiveXObject("Word.Application");
if (myApp != null)
{
myApp.Visible = true;
myApp.Documents.Open(strFile);
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<a href="javascript:startWord('C:\\Users\\Silver\\Desktop\\iii.doc')">mylink1</a>
</body>
</html>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

Please TellTheDetails and ShowSomeEffort. Just posting some code and expecting everyone else to figure out what your problem is isn't going to get you much help.

Also, as this is not a JSP questions, it's been moved to the HTML forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: opening a word document on localsystem in internet explorer
 
Similar Threads
I got http-500 error in servlet and jsp.how to find error?
toggling between two languages
http error404
give another jsp to action
Could not find action or result