|
I have a desktop, non-networked, standalone program that writes HTML text out to a set of files based on the data that it has processed, making a nice user interface for those that need to review what data was generated.
I want to provide the capability to have a second program be started with a filename as a command line parameter (?) when a user clicks on a filename within the HTML, to perform some additional processing on the contents of the selected file. I am guessing that this would have to be an anchor tag of some sort, but I don't know what kind and can't seem to find anything about it.
How can I write the HTML to start a specific program with the selected file as a parameter when a link is selected? Can I do this without having the file extension associated with my program?
Thanks,
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
The only way that I'm aware of is by having file associations. Otherwise, it's ActiveX time.... good luck.
onwards and upwards...
|
|
|
|
|
Do you know of anything within any of the scripting variations (VBscript, JavaScript, etc) that could be called when a link is selected, and that then could start execution of a program?
I would like to stay away from having to create file associations because if the data, the HTML, and the program are provided on a CD-ROM, for example, then there really isn't any "installation." It would just appear to the user that when they selected a certain link, a program would start using the selected file.
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
David Chamberlain wrote:
Do you know of anything within any of the scripting variations (VBscript, JavaScript, etc) that could be called when a link is selected, and that then could start execution of a program?
Due to security concerns and "sandboxing", these script languages are designed not to allow you to spawn an executable program from browser scripting.
David Chamberlain wrote:
It would just appear to the user that when they selected a certain link, a program would start using the selected file.
By just specifying the data file, the OS will prompt them the first time to browse for the program to open the file with. Instruct them to browse to the CD.
Sorry, those are the best answers I can give..
onwards and upwards...
|
|
|
|
|
If you are hosting the browser control in your app yuou can use window.external to route the click to your app and launch the other program from there.
I know there are some examples out there, I just can't remember them at the moment.
|
|
|
|
|
I would like to change Text on a webpage on the fly. I know about the innerText property for ie. I cann't use this however becuase I am not using ie. Or netscape for that matter. I need a way that is very browser nonspecific. Is there anyway to do this using javascript or JSP. I want to be able to change the text on the screen without reloading the page.
Thank you.
Mardigin.
|
|
|
|
|
hi..
you can put that portion that changes in a separate frame(myFrame)..
then make a link with target = myFramee .. when the user clicks the link the page in (myFrame) loads with new values So you can make it in asp to accept arguments..Got it ?
|
|
|
|
|
|
Hello:
I want to try writing perl scripts on Windows 2000 Professional, for a web application. I am using IIS 5.0 as web server.
How can I do that? Any advices or links to examples will be highly appreciated. Thanks
~~~~Pankaj~~~~
Follow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
Here[^] is the binary download for Perl on WinNT. I don't know whether it will work on Win2KPro, but you might try it out. You can also download the source files from the same site - perhaps you can tweak it to run with IIS5.
"The Lion shall lie down with the Lamb; but the Lamb will not get much sleep..." Lazarus Long
|
|
|
|
|
|
Hi,,
I make a page Save.asp that gets some data from a form in another page.. (method=Get)
Save.asp saves data to a DB then displays a success message..
the problem :
when the user press (Refresh or reload) in the browser the data is saved again..
How to prevent this from happenning ?
|
|
|
|
|
hspc wrote:
when the user press (Refresh or reload) in the browser the data is saved again..
HS,
Please post your code!
I believe I have seen this kind of thing before.
Tony
|
|
|
|
|
Having a stab here...
Try Request.ServerVariables("HTTP_REFERER") in Save.asp to see where they came from. If coming from Save.asp then the refresh is happening.
I'm not really sure if this would work, but I'd giv this a go first. Failing this, I would then think about either passing a variable from the first page to the second, or use Session("SessionID") which is unique per browser ..ie
(SQLServer7)
sSQL="IF Exists(SELECT * FROM tblInsert WHERE sessionID='"&Session("SessionID")&_
"') SELECT -1 ELSE BEGIN"&_
" INSERT INTO tblInsert(fields...)VALUES(values...);"&_
" SELECT 0 END"
run this, if -1 then already inserted
OR
set a session variable to say that this user has already submitted (if allowing for multiple submissions from same session, get the input page to reset the session variable)
Actually, I like the last the best, if REFERER fails.
Dave McRae
|
|
|
|
|
Thanks..
I loved the REFERRER Idea (even though I did not try it yet)
I think the Idea of SessionID will prevent the user from enterring new data in the same session .. also SessionID can be assigned to another user after the current one logs off.
the session variable is also great
the way I make it now is to let the save page redirects the user to another page (I don't like it coz it needs to make a trip to the client..Also won't work if a proxy exists)
|
|
|
|
|
ahh - yeah - I dont mind the redirect idea
(There are many ways to skin this cat )
also response.transfer (if you're using IIS5.0 or better - not an option with IIS4.0) would solve your worries with page redirects and be very good looking!!
Dave McRae
|
|
|
|
|
Response.Transfer??? Are you sure?
I think Server.Transfer.
But if we use Server.Transfer, we can not solve the problem because all submitted data still existes.
|
|
|
|
|
You're right, Server.Transfer
I've not tested server.transfer at all as the most influential of my clients can't bring themselve to move from NT4 as yet, but I understand it doesnt go back to client like response.redirect, but leaves execution from that point in the page where server.transfer was encountered and re-commences at the top of the page transfered to, like an #include only dynamic.
Yep - all the data exists, but I would imagine you'ld be transfereing away from the save page.
I should give this a bit more of a test - sorry about the bum steer if I gave 1.
Dave McRae
|
|
|
|
|
Hi all, I have a little problem with a JSP page I'm trying to develope. I need to check the value of a combo box in the page, but there are a different number of combos each time. The way I thought it would be the best is passing to the JavaScript function the name of the combo, like this:
<----------------------------------->
<----------------------------------->
The problem I have is, let's say I call the function with code = 1; I can't change "t" value from document.makers.code.value to document.makers.1.value. If I do this I have everything else done...
Thanks in advance for your help,
JaviGimenez
|
|
|
|
|
This isn't a direct answer, but maybe the concept is helpful:
<html>
<head>
<title>Test</title>
<script language="javascript">
<!--
function checkObj(theObj) {
var temp = theObj.value;
alert(temp);
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<form name="theForm">
<input type="text" name="text1"> <input type="button" value="Send This Object" onClick="checkObj(document.theForm.text1)"><br><br>
<input type="text" name="text2"> <input type="button" value="Send This Object" onClick="checkObj(document.theForm.text2)"><br><br>
</body>
</html>
Paul
-- modified 18-Jul-18 11:59am.
|
|
|
|
|
Okay, here's something more useful
function blah(obj_name){<br />
var temp;<br />
eval("temp = document.form." + obj_name + ".value")<br />
<br />
}
Paul
I don't think anyone should write their autobiography until after they're dead. - Samuel Goldwyn
modified 18-Jul-18 11:59am.
|
|
|
|
|
Is it possible to import html data from a file into
a table?
I'm trying to cut down on my page sizes, and I'm finding that if I change the navigation pane on one page I then have to go and change EVERY page to match it... Instead I would like to just have ONE file that contains the code for the navigation pane that I can load into each page as it comes up???
Any ideas?
|
|
|
|
|
Anonymous wrote:
Is it possible to import html data from a file into
a table?
Sure! Save the HTML as Text data, and retrieve it using ADO, then use ASP to spit it out at the proper place in the page(s).
"The Lion shall lie down with the Lamb; but the Lamb will not get much sleep..." Lazarus Long
|
|
|
|
|
thanks..... i'm going to have to do some research to fingure out what you mean by ado and asp.... but THANKS!
-Cope
|
|
|
|
|
Sorry.... ADO is a way to access databases from a web page - it's more than that, but that's all you're concerned with right now. ASP is the Active Server Pages technology used to create HTML on the fly using scripts which execute on the server. The output of the server script is a text stream containing HTML. You can store your HTML on an Access table, then in your ASP script create a connection to the table using ADO commands. Through that connection you then query the database table to retrieve the HTML to a string variable and send it to the client using Response.Write. There are some excellent articles on both ASP and ADO here at CodeProject, and I suggest that you spend some time reading them. Here[^] is a great starting point.
"The Lion shall lie down with the Lamb; but the Lamb will not get much sleep..." Lazarus Long
|
|
|
|