Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 19th, 2004, 10:58 PM
Authorized User
Join Date: Jun 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to Avoid PopUp Windows when link to a file?

Hi, I have written a link in html code to open a file in another server such as below:

Response.Write("<td style='width:10px'><A HREF = F:\" & dr9.GetString(0) & " > " & dr.GetString(0) & " </A></td>"

It did successfully linked, but each time click on the hyperlink, it will appear a Window PopUp asking u like that:

"File DownLoad

Some files can harm ur computer. If the file information below looks suspicious, or u do not fully trust the source, do not open and save this file.

Filename xxx.iwi
File Type IWI file
From F:
Would u like to open the file or save it to the computer?
buttons -- Open, Save, Cancel, More Info
tickbox -- Always ask b4 opening this type of files."

What I should include so that the end user can open the file straightly without asking save/open the file?

Any help is much more appreciated.

Old July 21st, 2004, 08:50 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts

If a way exists it would be called an exploit and I hope it doesn't exist.

Think about it. Would you like arbitrary files to "open" from web pages? .exe, .bat, pif...?

//\ =^..^=
Old July 22nd, 2004, 05:54 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post

You Can't from the server side. The server sends the file back to the browser with a tag saying what type of file it is. The browser - using the clients MIME type settings - then processes the file, if it say HTML or plain text, then it is simply displayed. A .DOC file will either be opened in IE (hosting MS Word) or opened natively in Word - depending on your MIME settings.

You can change the users settings and security settings to remove most of these dialogs, but this then leaves the machine open to running someone elses code - e.g. Hacker, SPAMBot etc.
Old July 29th, 2004, 08:43 PM
Authorized User
Join Date: Jun 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts

Finally I found my thread back, have been posted a lot of questions to ask from help here that I dun even forgot where I post it :
Well, the file is .iwi, which is currently not recognised by the Windows. Thus I set it to "always" "open with" using a software called Imaging, the PhotoEditor. B4 I do that, u can click the link but the IE shows nothing, only just now I realised about this "MIME settings".

The application I am working on is for end-user to search information from a database. Developed using VB .Net and running at Win2k platform. Once implemented many different users are going to use it. Therefore my boss request me to make it user-friendly so that non-IT users can also use the application, bcoz some of them does not know whether to press "open" or "save".

Yup I dun think they will reduce the security level too. But what else I could do?
I know Win2k can apply similiar settings to its domain. Can this be set by the admin so that once there is an .iwi file, it will use Imaging software to open it? Either way I am going to give an answer to my boss soon.

Thanx for ur guys replies, that really really help me a lot.

Similar Threads
Thread Thread Starter Forum Replies Last Post
calling a link into a popup (java) window dvdrony Classic ASP Basics 3 November 30th, 2004 08:21 PM
Avoid Warning Message on C lose Windows qazi_nomi Javascript 9 September 11th, 2004 11:19 AM
How to avoid a Basic Authentication popup via link snorre70 HTML Code Clinic 1 July 30th, 2004 06:34 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.