You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ganesh g <ga...@yahoo.com> on 2004/04/29 09:04:22 UTC

How to disable the "open" button on File Download Dialogue Box in servlets


ganesh g <ga...@yahoo.com> wrote:Hi Friends,
ThankQ very much ur non-stoping help 2wards me.
Here is a Small problem.

In a servelet Program...

f = new File(fPath);
httpServletResponse.setContentLength( (int) f.length());
httpServletResponse.setContentType("application/msword");
httpServletResponse.setHeader("Content-Disposition","attachment;filename=" + fName);

Now i'm getting "File Download Dialogue Box".
It contains the 4buttons such as open,save,cance and Moreinfo buttons.
i want control over all the buttons like:

What my intension is to hide/disable the "open" button and "cancel" button

awaiting 4ur reply

Advance Thanks
Ganesh



---------------------------------
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs 

		
---------------------------------
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs 

Re: How to disable the "open" button on File Download Dialogue Box in servlets

Posted by Ivan <iv...@interd4u.com>.
You cannot, it is a security option of browsers.

----- Original Message ----- 
From: "ganesh g" <ga...@yahoo.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Thursday, April 29, 2004 9:04 AM
Subject: How to disable the "open" button on File Download Dialogue Box in
servlets


>
>
> ganesh g <ga...@yahoo.com> wrote:Hi Friends,
> ThankQ very much ur non-stoping help 2wards me.
> Here is a Small problem.
>
> In a servelet Program...
>
> f = new File(fPath);
> httpServletResponse.setContentLength( (int) f.length());
> httpServletResponse.setContentType("application/msword");
> httpServletResponse.setHeader("Content-Disposition","attachment;filename="
+ fName);
>
> Now i'm getting "File Download Dialogue Box".
> It contains the 4buttons such as open,save,cance and Moreinfo buttons.
> i want control over all the buttons like:
>
> What my intension is to hide/disable the "open" button and "cancel" button
>
> awaiting 4ur reply
>
> Advance Thanks
> Ganesh
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs
>
>
> ---------------------------------
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org