PDA

View Full Version : window.location.href detaching file problem


thaiching
05-13-2004, 11:03 AM
Hi,
I have a problem detaching Microsoft word file using Internet Explorer.Below is the code line that i used to detach a file.

window.location.href="com.company123.ow.crm.marketing.campaign.AttachDoc.res?"+query;


This is working fine in Netscape and i can be able to detach the file using the window.location.href by setting a dynamic java operation to the "window.location.href". However, if i use IE to detach the file, it will give me error stating that "C:\...\com.company123.ow.crm.marketing.campaign.AttachDoc[1].res file not found". It seems like IE will take the whole string of the "Java operation" and try to detach the file with "C:\...\com.company123.ow.crm.marketing.campaign.AttachDoc[1].res" as the file name.

Any idea on workaround for this problem?

For your information, the string (com.company123.ow.crm.marketing.campaign.AttachDoc.res?"+query) will perform some java operation and return the result (file to be detached).

glenngv
05-13-2004, 01:09 PM
I assume that res is a servlet. Try putting absolute URL:

window.location.href="http://mydomain/com.company123.ow.crm.marketing.campaign.AttachDoc.res?"+query;

But why are you using the complete path to your servlet?
Why don't you mapped a simple name to it? You are exposing the path of your packages.