Launching App from Browser using XML-based file in link

J

Jim Spiller

Our Windows application registers the filetype ".xyz" so that doubleclicking
in Windows automatically starts our app and opens the data file within our
app. This all works great using Windows...

The filetype is an XML-based text file and not a binary file which seems to
cause problems when trying to use a Browser to open the file. If we create a
link in a Browser to the file "test.xyz" it displays the XML text within the
browser instead of starting our application and displaying the file.

We have experimented with setting "Content Type" but nothing seems to tell
the browser that filetype ".xyz" is associated with our app. It consistently
displays the XML text in the browser.

Is there a way to tell the browser that the file in a link is associated
with our app? In the registry perhaps. We would prefer not to have to tell
each user to set this on the server side of things.

Thanks!
 
J

Jim Spiller

Jon,

Thanks for the link but it doesn't really address the problem we are having.
Our filetype is not a restricted type. In fact, it's a text file (XML-style
data) that can only be read by our application that gets installed on the
client machine.

We just want to work as if you had placed a PDF file in a web page. In the
Brower, clicking the PDF file would launch the PDF Reader and load the file.
We know that the Browser looks into the file to see what type it is. Things
like PDF, XLS and DOC files are binary and thus the Browser simply asks
Windows for the associated program to start and load these files. However,
if the Browser sees a text file it apparently assumes that you want to
display this text in the browser window. We want to tell the browser not to
display the text but to start our application (which is registered in
Windows to open our text-based *.xyz files) and load the file the user
clicked on in the Browser.

Seeing as XML filetypes are getting more popular for applications to use for
their files it would seem that there would be an easy way to tell the
browser that the file is used to start an application and not for
displaying. It seems simple but we just can't find the answer<g>.

Any help would be greatly appreciated!

Jim
 
J

Joe Fawcett

Jim Spiller said:
Jon,

Thanks for the link but it doesn't really address the problem we are having.
Our filetype is not a restricted type. In fact, it's a text file (XML-style
data) that can only be read by our application that gets installed on the
client machine.

We just want to work as if you had placed a PDF file in a web page. In the
Brower, clicking the PDF file would launch the PDF Reader and load the file.
We know that the Browser looks into the file to see what type it is. Things
like PDF, XLS and DOC files are binary and thus the Browser simply asks
Windows for the associated program to start and load these files. However, if
the Browser sees a text file it apparently assumes that you want to display
this text in the browser window. We want to tell the browser not to display
the text but to start our application (which is registered in Windows to open
our text-based *.xyz files) and load the file the user clicked on in the
Browser.

Seeing as XML filetypes are getting more popular for applications to use for
their files it would seem that there would be an easy way to tell the browser
that the file is used to start an application and not for displaying. It seems
simple but we just can't find the answer<g>.

Any help would be greatly appreciated!

Jim
If you set the mime-type for the download to one that has a registered handler
on the client then it should work.
 
J

Jim Spiller

Joe,

<<If you set the mime-type for the download to one that has a registered
handler on the client then it should work.>>

But where do we set the mime type? On the server side? We want to avoid this
if possible since we don't really want to ask each user who wants to read
our files to set this on their server. We were hoping we could set this on
the client but apparently don't know the proper syntax and/or where to put
this commend? We have experimented with a number of "Content Type" command
variations in the registry and in the file but nothing seems to work. The
browser still views the file and determines it's text that needs to be
displayed. Any ideas about the proper command and where to invoke it?

Any help would be greatly appreciated!

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top