Home arrow static arrow Java Programming [Archive] - Problem launching Word document
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Problem launching Word document
This topic has 4 replies on 1 page.

Posts:82
Registered: 7/8/99
Problem launching Word document  
Jul 30, 2004 3:34 AM



 

I have the following script embedded in html. If I do a local test with a html page on my machine, this works fine - it lauches word as separate application with the word document I pass in.

If I render this code within a JSP served from weblogic, it simply has no effect. I cant figure out why it wont work.

Any ideas appreciated.

Thanks.


<SCRIPT>

documents = 'file:///'+'s:/batch/test.doc'

if(documents.length>0)
{
var wScript = new ActiveXObject("WScript.Shell");
wScript.Run(documents);

}

</SCRIPT>

 

Posts:18,384
Registered: 21.03.00
Re: Problem launching Word document  
Jul 30, 2004 4:04 AM (reply 1 of 4)



 
Is the path to the document s:/batch/ valid on the weblogic server?

/Kaj
 

Posts:82
Registered: 7/8/99
Re: Problem launching Word document  
Jul 30, 2004 4:12 AM (reply 2 of 4)



 
This is client side script. The problem is down to executing active x components on a page that does not have the html extension.
 

Posts:4,496
Registered: 19/06/02
Re: Problem launching Word document  
Jul 30, 2004 4:14 AM (reply 3 of 4)



 
I'm guessing this might be a security issue (sandbox). Try placing that doc inside the weblogic dir where your jsp is running from and see if that works.
 

Posts:82
Registered: 7/8/99
Re: Problem launching Word document  
Jul 30, 2004 4:30 AM (reply 4 of 4)



 
Your right this was a security issue on the browser. I dont think I'm going to get around using this solution as users would have to change browser settings.

I am able to open the word document through the browser using:

window1=window.open(documents);

but I need to have the actual word application open. If anyone knows of a way to do this with JS or VBS, I would appreciate it.
 
This topic has 4 replies on 1 page.