Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

|How2 launch an application from html page

Status
Not open for further replies.

Miss3M

Technical User
May 23, 2003
12
IE
Hi,


I am creating a series of web pages, cd based and I would like to be able to allow the user to open Notepad at the click of a button or hyperlink, so that the user can keep notes/ records etc which can be saved to their pc.
Any help would be great .
I am using Dreamweaver MX

thank you :)

 
Hummmm!

I do not know if you can do this using *HTML at all. I know it can be done with CFML (Server Side Scripting Language called ColdFusion Markup Language) using cfexecute(). I bet the same could be done in .asp .php and others.

If this is possible without serverside scripting, JS would be the answer. The safest bet would be to use .asp page to do the dirty work. - or - you might want to find a Java applet that could be used for this.

Good luck!


Jose Lerebours

KNOWLEDGE: Something you can give away endlessly and gain more of it in the process! - Jose Lerebours
 
Miss3M, JS has the capability of opening the users notepad using ActiveX, however this may or may not work for all users, due to the fact that you can't use a client side scriting to execute something on a users PC, that is a major security issue.

Read up more about this at:
[sub]
____________________________________
Just Imagine.
[sub]
 
Thanks so much for that.
I'll try it out now.
Your help is really appreciated.

thanx again :)
 
if the file is in plain text and saved as "file.txt" Notepad is the defualt text editor...it will run automatically...but above all...if it is only a text...why not simply display it in IE? it is not like users can edit your files on CD anyhow ...files are "read only"
All the best!

> need more info?
:: don't click HERE ::
 
Create a page called downloads.asp and put this in it

Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
strFile = request.QueryString("file")
strOne = "attachment; filename=" & strFile
strTwo = strFile
Response.Buffer=true
On Error Resume Next
'Create a stream object
Dim tfm_downloadStream
Set tfm_downloadStream = Server.CreateObject("ADODB.Stream")
tfm_downloadStream.Type = 1
tfm_downloadStream.Open
tfm_downloadStream.LoadFromFile Server.Mappath(strTwo)
If Err.number = 0 Then
  Response.Clear
  Response.ContentType = "application/octet-stream"
  Response.AddHeader "Content-Disposition", strOne
  Response.AddHeader "Content-Transfer-Encoding","binary"
  Response.BinaryWrite tfm_downloadStream.Read
  tfm_downloadStream.Close
  Set tfm_downloadStream = Nothing
  Response.End()
Else
  tfm_downloadStream.Close
  Set tfm_downloadStream = Nothing  
  Response.Redirect("oops.asp")
End If 
%>

now put an empty text file on your cd and link to it like so

Code:
<a href="downloads.asp?file=notes.txt">My Link</a>

This will force the download/open window so the user gets a text file open

Cheech

[Peace][Pipe]
 
QUESTION: If this is supposed to be a CD based application, how can the ASP code work?? Doesn't ASP require some kind of server connection to execute??

[sub]
____________________________________
Just Imagine.
[sub]
 
LOL some one is working too hard lately Cheech ;-)
Cheech needs a vacation.....how 'bout Holland :-D



> need more info?
:: don't click HERE ::
 
Code:
correct again Gujumodel

No matter how many times you hear it, its still sounds good...LOL, j/k

Hmmmmm, me thinks Cheech needs a nice sunny tropical vacation.

[sub]
____________________________________
Just Imagine.
[sub]
 
Just spent nearly a week in bed with some sort of virus, so I blame it on that.

Cheech

[Peace][Pipe]
 
If you still need help with this I achieved something similar a few years ago using an ActiveX control I found on web called Launch Application or something.. cant find detail on web at the moment but I have them at home.. let me know if you want me to find out more..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top